#JC-1945: Added unit test and javadoc