Properly used Object.equals() in BooleanRefactoring