JUnit tests for the revised classed

+ Javadoc for test methods