mil.dod.th.ose.core/test/mil/dod/th/ose/core/factory/impl/TestFactoryConfigurationService.java
@Test
    public void testGetServiceAttributeDefinitionsOptional()
    {
        MetaTypeMocker.registerMetaTypeAttributes(m_ApiBundle, 
                FactoryObject.class.getName() + FactoryObjectInternal.ATTRIBUTES_CLASS_SUFFIX, // service PID 
                null, m_ServiceAttrsOpt, null);

        AttributeDefinition[] attrs = m_SUT.getServiceAttributeDefinitions(ObjectClassDefinition.OPTIONAL);
        
        assertThat(Arrays.asList(attrs), hasItems(m_ServiceAttrsOpt)); 
        assertThat(Arrays.asList(attrs), hasItems(m_ExtendedAttrsOpt)); 
        assertThat(attrs.length, is(m_ServiceAttrsOpt.length + m_ExtendedAttrsOpt.length));  
    }
/**
     * Verify both service and extended optional attributes are returned.
     */
Verify both service and extended optional attributes are returned.
Verify both service and extended optional attributes are returned .
@Test
    public void testGetServiceAttributeDefinitionsOptional()
    {
        MetaTypeMocker.registerMetaTypeAttributes(m_ApiBundle, 
                FactoryObject.class.getName() + FactoryObjectInternal.ATTRIBUTES_CLASS_SUFFIX, 
                null, m_ServiceAttrsOpt, null);
        AttributeDefinition[] attrs = m_SUT.getServiceAttributeDefinitions(ObjectClassDefinition.OPTIONAL);
        assertThat(Arrays.asList(attrs), hasItems(m_ServiceAttrsOpt)); 
        assertThat(Arrays.asList(attrs), hasItems(m_ExtendedAttrsOpt)); 
        assertThat(attrs.length, is(m_ServiceAttrsOpt.length + m_ExtendedAttrsOpt.length));  
    }
@ Test public void testGetServiceAttributeDefinitionsOptional ( ) { MetaTypeMocker . registerMetaTypeAttributes ( m_ApiBundle , FactoryObject . class . getName ( ) + FactoryObjectInternal . ATTRIBUTES_CLASS_SUFFIX , null , m_ServiceAttrsOpt , null ) ; AttributeDefinition [ ] attrs = m_SUT . getServiceAttributeDefinitions ( ObjectClassDefinition . OPTIONAL ) ; assertThat ( Arrays . asList ( attrs ) , hasItems ( m_ServiceAttrsOpt ) ) ; assertThat ( Arrays . asList ( attrs ) , hasItems ( m_ExtendedAttrsOpt ) ) ; assertThat ( attrs . length , is ( m_ServiceAttrsOpt . length + m_ExtendedAttrsOpt . length ) ) ; }
Verify both service and extended optional attributes are returned.
Verify both service and extended optional attributes are returned .
// service PID 