Added JUnit tests