Added Unit Test for Java