### Question:
MValue implements ModelElement<T> { public T asJavaObject() { return javaObject; } MValue(Token tok, String typeName, Message errMessage, String value); T asJavaObject(); T asEhcacheObject(); @Override String toString(); String getTypeName(); String getValue(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void testEnumValue() throws CustomParseException { MEnum<Foo> enumVal = new MValue.MEnum<Foo>(null, Foo.class.getName(), "Bar"); Enum<Foo> obj = enumVal.asJavaObject(); Assert.assertEquals(Foo.Bar, obj); try { new MValue.MEnum<Foo>(null, Foo.class.getName(), "Barr"); Assert.fail(); } catch (Exception e) { } }