// check that the list iterator will store this new value as an immutable object
iterator.next();
iterator.set(booleanValue2);
// Get the value stored in index 1
BooleanValue obtainedBooleanValue = (BooleanValue) typedList.get(0);
// check that the new value set at index 1 is value 2
assertEquals("The new value at index 1 should be " + booleanValue2,
booleanValue2, obtainedBooleanValue);
// check that it is immutable
if (obtainedBooleanValue instanceof ImmutableInhibitor == false) {
fail("the returned value should be an implementation of an " +
"ImmutableMetaDataOobject, was " + obtainedBooleanValue.getClass());
}
}