// check the created object
final List enumeratedValues =
string.getEnumeratedConstraint().getEnumeratedValues();
assertEquals(2, enumeratedValues.size());
final MetaDataValue first = (MetaDataValue) enumeratedValues.get(0);
assertTrue(first instanceof StringValue);
assertEquals("foo", first.getAsString());
final MetaDataValue second = (MetaDataValue) enumeratedValues.get(1);
assertEquals("bar", second.getAsString());
assertTrue(second instanceof StringValue);
final Object otherString = doRoundTrip(string);
assertEquals(string, otherString);
}