modified test case and java class