increasing test coverage and providing javadoc