I'm currently learning about unit testing, specifically JUnit (with Java).
Searching the web I see many threads talking about why you should use it, what type of methods you should use it with but I can't seem to find much information on when you should implement a unit test.
Is it best to incorporate it from the very beginning of a project and then with every method you create, you add a unit test? Or is it something that it's done towards the latter stages when the logic/structure of the program is closer to completion?