* Tests that we are not allowed to add objects of the wrong type, and are
* allowed to add objects of the correct type on the <code>ListIterator</code>
* provided by {@link TypedList#iterator}.
*/
public void testIteratorOnlyAddsAllowableTypes() {
MetaDataFactory f = MetaDataFactory.getDefaultInstance();
MutableBooleanValue allowableObject = (MutableBooleanValue) f.getValueFactory()
.createBooleanValue().createMutable();
allowableObject.setValue(Boolean.TRUE);
NumberValue unallowableObject = (NumberValue) f.getValueFactory()
.createNumberValue();
TypedList typedList = new TypedList(new ArrayList(), BooleanValue.class);
ListIterator iterator = typedList.listIterator();
// check that the list iterator will allow an permitted type to be added