test case convert to java program