Added another unit test and some javadoc