Another challenge related to writing the unit tests is the difficulty of setting up realistic and useful tests.
To obtain the intended benefits from unit testing, rigorous discipline is needed throughout the software development process.