final Object otherList = doRoundTrip(set);
assertEquals(set, otherList);
}
public void testSetWithBooleansAndStrings() throws Exception {
final ImmutableSetValue set = (ImmutableSetValue) unmarshall(
getResourceAsString("res/set-with-booleans-and-strings.xml"),
ImmutableSetValueImpl.class);
// check the created object
final Set expectedSet = new HashSet();
MutableStringValue stringValue = new MutableStringValueImpl();
stringValue.setValue("First Value");
expectedSet.add(stringValue.createImmutable());
MutableBooleanValue booleanValue = new MutableBooleanValueImpl();
booleanValue.setValue(Boolean.TRUE);
expectedSet.add(booleanValue.createImmutable());
booleanValue.setValue(Boolean.FALSE);
expectedSet.add(booleanValue.createImmutable());
stringValue.setValue("Fourth Value");
expectedSet.add(stringValue.createImmutable());
assertEquals(expectedSet, set.getContentsAsSet());
final Object otherList = doRoundTrip(set);
assertEquals(set, otherList);
}