// icAttribute as parameter, uniqueAttribute as extensibleAttribute
exAttr.clear();
exAttr.add(new Attribute(uniqueAttribute));
component = new Resource(TEST_TOP_LEVEL_COMPONENTS, null, null, null, getTestIsmDesVersion(),
getTestNtkDesVersion(), null, null, new ExtensibleAttributes(exAttr));
assertEquals(getTestIsmDesVersion(), component.getIsmDESVersion());
assertTrue(component.getSecurityAttributes().isEmpty());
assertEquals(1, component.getExtensibleAttributes().getAttributes().size());
// icAttribute and uniqueAttribute as extensibleAttributes
exAttr.clear();
exAttr.add(new Attribute(icAttribute));
exAttr.add(new Attribute(uniqueAttribute));
component = new Resource(TEST_TOP_LEVEL_COMPONENTS, new ExtensibleAttributes(exAttr));
assertNull(component.getIsmDESVersion());
assertTrue(component.getSecurityAttributes().isEmpty());
assertEquals(2, component.getExtensibleAttributes().getAttributes().size());
// secAttribute as securityAttribute, uniqueAttribute as extensibleAttribute
exAttr.clear();
exAttr.add(new Attribute(uniqueAttribute));
component = new Resource(TEST_TOP_LEVEL_COMPONENTS, null, null, null, null, null,
SecurityAttributesTest.getFixture(), null, new ExtensibleAttributes(exAttr));
assertNull(component.getIsmDESVersion());
assertFalse(component.getSecurityAttributes().isEmpty());
assertEquals(1, component.getExtensibleAttributes().getAttributes().size());
// secAttribute and uniqueAttribute as extensibleAttribute
exAttr.clear();
exAttr.add(new Attribute(secAttribute));
exAttr.add(new Attribute(uniqueAttribute));
component = new Resource(TEST_TOP_LEVEL_COMPONENTS, new ExtensibleAttributes(exAttr));
assertNull(component.getIsmDESVersion());
assertTrue(component.getSecurityAttributes().isEmpty());
assertEquals(2, component.getExtensibleAttributes().getAttributes().size());
// icAttribute as parameter, secAttribute as securityAttribute, uniqueAttribute as extensibleAttribute
exAttr.clear();
exAttr.add(new Attribute(uniqueAttribute));
component = new Resource(TEST_TOP_LEVEL_COMPONENTS, null, null, null, getTestIsmDesVersion(),
getTestNtkDesVersion(), SecurityAttributesTest.getFixture(), null, new ExtensibleAttributes(exAttr));
assertEquals(getTestIsmDesVersion(), component.getIsmDESVersion());
assertFalse(component.getSecurityAttributes().isEmpty());
assertEquals(1, component.getExtensibleAttributes().getAttributes().size());
// icAttribute as parameter, secAttribute and uniqueAttribute as extensibleAttributes
exAttr.clear();
exAttr.add(new Attribute(secAttribute));
exAttr.add(new Attribute(uniqueAttribute));
component = new Resource(TEST_TOP_LEVEL_COMPONENTS, null, null, null, getTestIsmDesVersion(),
getTestNtkDesVersion(), null, null, new ExtensibleAttributes(exAttr));
assertEquals(getTestIsmDesVersion(), component.getIsmDESVersion());
assertTrue(component.getSecurityAttributes().isEmpty());
assertEquals(2, component.getExtensibleAttributes().getAttributes().size());
// secAttribute as securityAttribute, icAttribute and uniqueAttribute as extensibleAttributes
exAttr.clear();
exAttr.add(new Attribute(icAttribute));
exAttr.add(new Attribute(uniqueAttribute));
component = new Resource(TEST_TOP_LEVEL_COMPONENTS, null, null, null, null, null,
SecurityAttributesTest.getFixture(), null, new ExtensibleAttributes(exAttr));
assertNull(component.getIsmDESVersion());
assertFalse(component.getSecurityAttributes().isEmpty());
assertEquals(2, component.getExtensibleAttributes().getAttributes().size());
// all three as extensibleAttributes
exAttr.clear();
exAttr.add(new Attribute(icAttribute));
exAttr.add(new Attribute(secAttribute));
exAttr.add(new Attribute(uniqueAttribute));
component = new Resource(TEST_TOP_LEVEL_COMPONENTS, new ExtensibleAttributes(exAttr));
assertNull(component.getIsmDESVersion());
assertTrue(component.getSecurityAttributes().isEmpty());
assertEquals(3, component.getExtensibleAttributes().getAttributes().size());
}