Write javadoc
Make test case method for ease of testing