### Question:
ReflectionUtil { public static boolean isComplexClass(Class fieldClass) { Objects.requireNonNull(fieldClass, "Class is required"); boolean complex = false; if (!fieldClass.isPrimitive() && !fieldClass.isEnum() && !fieldClass.isArray() && !fieldClass.getSimpleName().equalsIgnoreCase(String.class.getSimpleName()) && !fieldClass.getSimpleName().equalsIgnoreCase(Long.class.getSimpleName()) && !fieldClass.getSimpleName().equalsIgnoreCase(Short.class.getSimpleName()) && !fieldClass.getSimpleName().equalsIgnoreCase(Character.class.getSimpleName()) && !fieldClass.getSimpleName().equalsIgnoreCase(Byte.class.getSimpleName()) && !fieldClass.getSimpleName().equalsIgnoreCase(Integer.class.getSimpleName()) && !fieldClass.getSimpleName().equalsIgnoreCase(Boolean.class.getSimpleName()) && !fieldClass.getSimpleName().equalsIgnoreCase(Double.class.getSimpleName()) && !fieldClass.getSimpleName().equalsIgnoreCase(Float.class.getSimpleName()) && !fieldClass.getSimpleName().equalsIgnoreCase(BigDecimal.class.getSimpleName()) && !fieldClass.getSimpleName().equalsIgnoreCase(Date.class.getSimpleName()) && !fieldClass.getSimpleName().equalsIgnoreCase(List.class.getSimpleName()) && !fieldClass.getSimpleName().equalsIgnoreCase(Map.class.getSimpleName()) && !fieldClass.getSimpleName().equalsIgnoreCase(Collection.class.getSimpleName()) && !fieldClass.getSimpleName().equalsIgnoreCase(Queue.class.getSimpleName()) && !fieldClass.getSimpleName().equalsIgnoreCase(Set.class.getSimpleName()) && !fieldClass.getSimpleName().equalsIgnoreCase(BigInteger.class.getSimpleName())) { complex = true; } return complex; }  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 testIsComplexClass() { System.out.println("isComplexClass"); boolean expResult = true; boolean result = ReflectionUtil.isComplexClass(TestModel.class); assertEquals(expResult, result); expResult = true; result = ReflectionUtil.isComplexClass(HashMap.class); assertEquals(expResult, result); expResult = false; result = ReflectionUtil.isComplexClass(String.class); assertEquals(expResult, result); }