mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/comms/TestCommsLayerLinkModel.java
@Test
    public void testGetImage()
    {
        assertThat(m_SUT.getImage(), is(COMMS_ICON_GENERIC));
        
        LinkLayerCapabilities caps = mock(LinkLayerCapabilities.class);
        when(m_TypesMgr.getCapabilities(123, "clazz")).thenReturn(caps);
        
        assertThat(m_SUT.getImage(), is(COMMS_ICON_GENERIC));
        
        when(caps.getModality()).thenReturn(LinkLayerTypeEnum.CELLULAR);
        
        assertThat(m_SUT.getImage(), is(COMMS_ICON_CELLULAR));
    }
/**
     * Verify correct image path is returned based on capabilities.
     */
Verify correct image path is returned based on capabilities.
Verify correct image path is returned based on capabilities .
@Test
    public void testGetImage()
    {
        assertThat(m_SUT.getImage(), is(COMMS_ICON_GENERIC));
        LinkLayerCapabilities caps = mock(LinkLayerCapabilities.class);
        when(m_TypesMgr.getCapabilities(123, "clazz")).thenReturn(caps);
        assertThat(m_SUT.getImage(), is(COMMS_ICON_GENERIC));
        when(caps.getModality()).thenReturn(LinkLayerTypeEnum.CELLULAR);
        assertThat(m_SUT.getImage(), is(COMMS_ICON_CELLULAR));
    }
@ Test public void testGetImage ( ) { assertThat ( m_SUT . getImage ( ) , is ( COMMS_ICON_GENERIC ) ) ; LinkLayerCapabilities caps = mock ( LinkLayerCapabilities . class ) ; when ( m_TypesMgr . getCapabilities ( 123 , "clazz" ) ) . thenReturn ( caps ) ; assertThat ( m_SUT . getImage ( ) , is ( COMMS_ICON_GENERIC ) ) ; when ( caps . getModality ( ) ) . thenReturn ( LinkLayerTypeEnum . CELLULAR ) ; assertThat ( m_SUT . getImage ( ) , is ( COMMS_ICON_CELLULAR ) ) ; }
Verify correct image path is returned based on capabilities.
Verify correct image path is returned based on capabilities .