create test java class inherit