Adding JUnit tests