JUnit tests for sample code