* This test ensures that when entrySet() is called, then the provided Iterator will
* not allow callers to use setValue on the <code>Map.Entry</code> object with
* forbidden types, but will allow callers to setValue with an allowed type.
*/
public void testEntrySetIteratorWillOnlyAllowCorrectType() {
MetaDataFactory f = MetaDataFactory.getDefaultInstance();
MutableBooleanValue allowableValue= (MutableBooleanValue) f.getValueFactory()
.createBooleanValue().createMutable();
allowableValue.setValue(Boolean.TRUE);
BooleanValue newAllowableValue = (BooleanValue) f.getValueFactory()
.createBooleanValue();
String allowableKey = "key";
NumberValue forbiddenValue = (NumberValue) f.getValueFactory().createNumberValue();
// create the map so that it only allows allowable values and keys
TypedMap typedMap = createTypedMap(new HashMap(),
allowableValue.getClass(), false);