Added more units tests for Java