### Question:
ReflectionUtil { static public Field getField(Class<?> clazz, String name){ while(clazz != null){ try { Field field = clazz.getDeclaredField(name); if(!ReflectionUtil.FIELD_SELECTOR.test(field)){ throw new IllegalArgumentException(name); } return field; } catch(NoSuchFieldException nsfe){ } clazz = clazz.getSuperclass(); } throw new RuntimeException(new NoSuchFieldException(name)); } 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 getField(){ ReflectionUtil.getField(PMML.class, "version"); ReflectionUtil.getField(CustomPMML.class, "version"); }