Added test cases comparing to Java