added some JUnit tests