added basic java logic test cases