### Question:
EnumUtil { static public String getEnumValue(Enum<?> value){ Class<?> clazz = value.getClass(); Field field; try { field = clazz.getField(value.name()); } catch(NoSuchFieldException nsfe){ throw new RuntimeException(nsfe); } XmlEnumValue enumValue = field.getAnnotation(XmlEnumValue.class); if(enumValue != null){ return enumValue.value(); } throw new IllegalArgumentException(); } private  EnumUtil(); static Field getEnumField(PMMLObject object, Enum<?> value); static String getEnumValue(Enum<?> value);  }### Answer:
@Test public void getEnumValue(){ DataField.Cyclic zero = DataField.Cyclic.ZERO; assertEquals("ZERO", zero.name()); assertEquals("0", zero.value()); assertEquals("0", EnumUtil.getEnumValue(zero)); }