Added javadoc and updated integration test