### Question:
ReflectionUtil { public static boolean isFieldsDifferent(Object original, Object newField) { boolean changed = false; if (original != null && newField == null) { changed = true; } else if (original == null && newField != null) { changed = true; } else if (original != null && newField != null) { changed = !(original.equals(newField)); } return changed; }  static boolean isComplexClass(Class fieldClass); static boolean isCollectionClass(Class checkClass); static List<Field> getAllFields(Class typeClass); static boolean isSubLookupEntity(Class entityClass); static boolean isSubClass(String className, Class entityClass); static boolean isFieldsDifferent(Object original, Object newField); static int compareObjects(T origin, T other); static Field getField(Object entity, String fieldName); static final String LOOKUP_ENTITY; static final String BASECOMPONENT_ENTITY; static final String COMPOSITE_KEY_SEPERATOR; static final String COMPOSITE_KEY_REPLACER; }### Answer:
@Test public void testCompareFields() { System.out.println("compareFields"); boolean expResult = true; boolean result = ReflectionUtil.isFieldsDifferent("Test", "TEST"); assertEquals(expResult, result); expResult = false; result = ReflectionUtil.isFieldsDifferent("Test", "Test"); assertEquals(expResult, result); expResult = true; result = ReflectionUtil.isFieldsDifferent("Field", "Test"); assertEquals(expResult, result); }
@Test public void testIsFieldsDifferent() { System.out.println("isFieldsDifferent"); Object original = "Test"; Object newField = "Test2"; boolean expResult = true; boolean result = ReflectionUtil.isFieldsDifferent(original, newField); assertEquals(expResult, result); original = "SameTest"; newField = "SameTest"; expResult = false; result = ReflectionUtil.isFieldsDifferent(original, newField); assertEquals(expResult, result); }