added JUnit tests