Added unit tests
Javadoc