mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/ccomm/physical/TestPhysicalLinkServiceProxy.java
@SuppressWarnings("unchecked")
    @Test
    public void testCreateComponentInstanceSerialPort()
    {
        //mock factory descriptor
        FactoryInternal desc = mock(FactoryInternal.class);
        PhysicalLinkCapabilities caps = mock(PhysicalLinkCapabilities.class);
        when(desc.getCapabilities()).thenReturn(caps);
        when(caps.getLinkType()).thenReturn(PhysicalLinkTypeEnum.SERIAL_PORT);
        
        ComponentInstance instance = m_SUT.createFactoryObjectInternal(desc);
        
        verify(m_ComponentFactory).newInstance(Mockito.any(Dictionary.class));
        
        assertThat(instance, is(m_ComponentInfo.getInstance()));
    }
/**
     * Verify that an internal serial port type object can be created.
     */
Verify that an internal serial port type object can be created.
Verify that an internal serial port type object can be created .
@SuppressWarnings("unchecked")
    @Test
    public void testCreateComponentInstanceSerialPort()
    {
        FactoryInternal desc = mock(FactoryInternal.class);
        PhysicalLinkCapabilities caps = mock(PhysicalLinkCapabilities.class);
        when(desc.getCapabilities()).thenReturn(caps);
        when(caps.getLinkType()).thenReturn(PhysicalLinkTypeEnum.SERIAL_PORT);
        ComponentInstance instance = m_SUT.createFactoryObjectInternal(desc);
        verify(m_ComponentFactory).newInstance(Mockito.any(Dictionary.class));
        assertThat(instance, is(m_ComponentInfo.getInstance()));
    }
@ SuppressWarnings ( "unchecked" ) @ Test public void testCreateComponentInstanceSerialPort ( ) { FactoryInternal desc = mock ( FactoryInternal . class ) ; PhysicalLinkCapabilities caps = mock ( PhysicalLinkCapabilities . class ) ; when ( desc . getCapabilities ( ) ) . thenReturn ( caps ) ; when ( caps . getLinkType ( ) ) . thenReturn ( PhysicalLinkTypeEnum . SERIAL_PORT ) ; ComponentInstance instance = m_SUT . createFactoryObjectInternal ( desc ) ; verify ( m_ComponentFactory ) . newInstance ( Mockito . any ( Dictionary . class ) ) ; assertThat ( instance , is ( m_ComponentInfo . getInstance ( ) ) ) ; }
Verify that an internal serial port type object can be created.
Verify that an internal serial port type object can be created .
//mock factory descriptor