### Question:
EnumUtil { static public Field getEnumField(PMMLObject object, Enum<?> value){ Class<?> clazz = object.getClass(); while(clazz != null){ Field[] fields = clazz.getDeclaredFields(); for(Field field : fields){ if((field.getType()).equals(value.getClass())){ return field; } } clazz = clazz.getSuperclass(); } throw new IllegalArgumentException(); } private  EnumUtil(); static Field getEnumField(PMMLObject object, Enum<?> value); static String getEnumValue(Enum<?> value);  }### Answer:
@Test public void getEnumField(){ DataField dataField = new DataField(); assertEquals(PMMLAttributes.DATAFIELD_CYCLIC, EnumUtil.getEnumField(dataField, DataField.Cyclic.ZERO)); }