### Question:
ReflectionUtil { static public List<Field> getFields(Class<?> clazz){ List<Field> result = ReflectionUtil.classFields.get(clazz); if(result == null){ result = loadFields(clazz); ReflectionUtil.classFields.putIfAbsent(clazz, result); } return result; } private  ReflectionUtil(); static boolean equals(Object left, Object right); static boolean equals(PMMLObject left, PMMLObject right); static void copyState(E from, E to); static Field getField(Class<?> clazz, String name); static List<Field> getFields(Class<?> clazz); static List<Field> getAttributeFields(); static List<Field> getElementFields(); static Method getGetterMethod(Field field); static Map<Field, Method> getGetterMethods(Class<?> clazz); @SuppressWarnings ( value = {"unchecked"} ) static E getFieldValue(Field field, Object object); static void setFieldValue(Field field, Object object, Object value); @SuppressWarnings ( value = {"unchecked"} ) static E getGetterMethodValue(Method method, Object object); static boolean isPrimitiveWrapper(Class<?> clazz); static boolean isDefaultValue(Object value); static List<Field> getClassConstants(List<Class<?>> clazzes);  }### Answer:
@Test public void getFields(){ List<Field> fields = ReflectionUtil.getFields(PMML.class); List<Field> customFields = ReflectionUtil.getFields(CustomPMML.class); assertEquals(1 + 8 , fields.size()); assertEquals(new HashSet<>(fields), new HashSet<>(customFields)); }