### Question:
Reflect { public static List<Field> getAllFields(Class<?> fieldClass) { List<Field> fields = ClassDataCacher.getInstance().getClassData(fieldClass).getFields(); return new ArrayList<>(fields); } Reflect(Class parametrizedClass); static boolean isCollection(Class<?> fieldClass); static boolean isCollection(Object object); static List<Field> getAllFields(Class<?> fieldClass); static boolean isAnnotationPresent(Class<?> fieldClass, String fieldName, Class<? extends Annotation> annotation); @SuppressWarnings("unchecked") boolean isSuperClass(Class subClass); boolean isSuperClass(Type t); boolean isSuperClass(Object object); @SuppressWarnings("unchecked") boolean isCollectionField(Field field); List<Field> getInheritedFields(Class<?> subClass); boolean hasField(Field field);  }### Answer:
@Test public void getAllFields_shouldReturnAllFieldsIncludePrivateAndSuperClasses() { List<Field> allFields = Reflect.getAllFields(OpenmrsObjectImp.class); findFieldByName(allFields, "subClassField"); findFieldByName(allFields, "normalClassField"); findFieldByName(allFields, "nonCollectionField"); findFieldByName(allFields, "genericCollectionField"); }