Example of using JUnit to write test for existing code