mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/asset/TestAssetImageService.java
@Test
    public void testTryGetImageUnknownModel()
    {
        ControllerModel model = mock(ControllerModel.class);
        when(m_ActiveController.getActiveController()).thenReturn(model);
        when(model.getId()).thenReturn(SYSTEM_ID);
        when(m_ActiveController.isActiveControllerSet()).thenReturn(true);
        
        UUID assetUuid = UUID.randomUUID();
        when(m_AssetManager.getAssetModelByUuid(assetUuid, SYSTEM_ID)).
            thenReturn(null);

        String image = m_SUT.tryGetAssetImage(assetUuid);
        
        assertThat(image, is("thoseIcons/default/defaultImage.png"));
    }
/**
     * Verify that tryGetImage, will return an image string if the asset model is not
     * known.
     */
Verify that tryGetImage, will return an image string if the asset model is not
known.
Verify that tryGetImage will return an image string if the asset model is not known .
@Test
    public void testTryGetImageUnknownModel()
    {
        ControllerModel model = mock(ControllerModel.class);
        when(m_ActiveController.getActiveController()).thenReturn(model);
        when(model.getId()).thenReturn(SYSTEM_ID);
        when(m_ActiveController.isActiveControllerSet()).thenReturn(true);
        UUID assetUuid = UUID.randomUUID();
        when(m_AssetManager.getAssetModelByUuid(assetUuid, SYSTEM_ID)).
            thenReturn(null);
        String image = m_SUT.tryGetAssetImage(assetUuid);
        assertThat(image, is("thoseIcons/default/defaultImage.png"));
    }
@ Test public void testTryGetImageUnknownModel ( ) { ControllerModel model = mock ( ControllerModel . class ) ; when ( m_ActiveController . getActiveController ( ) ) . thenReturn ( model ) ; when ( model . getId ( ) ) . thenReturn ( SYSTEM_ID ) ; when ( m_ActiveController . isActiveControllerSet ( ) ) . thenReturn ( true ) ; UUID assetUuid = UUID . randomUUID ( ) ; when ( m_AssetManager . getAssetModelByUuid ( assetUuid , SYSTEM_ID ) ) . thenReturn ( null ) ; String image = m_SUT . tryGetAssetImage ( assetUuid ) ; assertThat ( image , is ( "thoseIcons/default/defaultImage.png" ) ) ; }
Verify that tryGetImage, will return an image string if the asset model is not
 known.
Verify that tryGetImage will return an image string if the asset model is not known .