It's never a perfect science, but one way to know if you're testing the behavior or the implementation is to ask "will this unit test break if I refactor?" If refactoring will break the test, then it's not a good unit test.
It's never a perfect science, but one way to know if you're testing the behavior or the implementation is to ask "will this unit test break if I refactor?" If refactoring will break the test, then it's not a good unit test.