### Question:
DataEnumLoader { public boolean hasErrors() { return this.errors.size() > 0; } DataEnumLoader(final String mvelSource, final MVELEvaluator mvelEvaluator);  DataEnumLoader(final String mvelSource,
                          final ClassLoader classLoader,
                          final MVELEvaluator mvelEvaluator); List<String> getErrors(); boolean hasErrors(); Map<String, String[]> getData();  }### Answer:
@Test public void testSimpleEnum() { final String e = "'Fact.field1':[\"A\", \"B\"]"; final DataEnumLoader loader = new DataEnumLoader(e, new RawMVELEvaluator()); assertFalse(loader.hasErrors()); }
@Test public void testValidEnumMultiLine() { final String e = "'Fact.field1':[\"A\", \"B\"]" + System.lineSeparator() + "'Fact.field2':[1, 2]"; final DataEnumLoader loader = new DataEnumLoader(e, new RawMVELEvaluator()); assertFalse(loader.hasErrors()); }
@Test public void testSimpleAndDependentEnum() { final String e = "'Fact.field1':[\"A\", \"B\"]" + System.lineSeparator() + "'Fact.field2[field1=A]':[1, 2]"; final DataEnumLoader loader = new DataEnumLoader(e, new RawMVELEvaluator()); assertFalse(loader.hasErrors()); }
@Test public void testValidDependentEnum() { final String e = "'Fact.field2[field1=A]':'[1, 2, 3]'"; final DataEnumLoader loader = new DataEnumLoader(e, new RawMVELEvaluator()); assertFalse(loader.hasErrors()); }
@Test public void testInvalidDependentEnum_AdvancedEnum1() { final String e = "'Fact.field[dependentField1, dependentField2]' : '(new org.company.DataHelper()).getList(\"@{dependentField1}\", \"@{dependentField2}\")'"; final DataEnumLoader loader = new DataEnumLoader(e, new RawMVELEvaluator()); assertFalse(loader.hasErrors()); }
@Test public void testInvalidDependentEnum_AdvancedEnum2() { final String e = "'Fact.field[dependentField1]' : '(new org.company.DataHelper()).getList(\"@{dependentField1}\")'"; final DataEnumLoader loader = new DataEnumLoader(e, new RawMVELEvaluator()); assertFalse(loader.hasErrors()); }