mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/mp/TestMissionRequestImpl.java
@Test
    public void testGetStreamPrimaryImageWithNullMissionName()
    {
        //Mock the image and mission template to be used.
        Map<String, String> paramsMap = new HashMap<String, String>();
        ExternalContext testExtContext = mock(ExternalContext.class);
        
        //Mocked methods.
        when(m_FacesContext.getExternalContext()).thenReturn(testExtContext);
        when(testExtContext.getRequestParameterMap()).thenReturn(paramsMap);
        
        //Call to method being tested. Should return an empty StreamedContent object.
        StreamedContent content =  m_SUT.getStreamPrimaryImage();
        
        assertThat(content.getContentType(), nullValue());
        assertThat(content.getStream(), nullValue());
    }
/**
     * Verify that if a mission name cannot be found an empty default streamed content object 
     * is returned.
     */
Verify that if a mission name cannot be found an empty default streamed content object
is returned.
Verify that if a mission name cannot be found an empty default streamed content object is returned .
@Test
    public void testGetStreamPrimaryImageWithNullMissionName()
    {
        Map<String, String> paramsMap = new HashMap<String, String>();
        ExternalContext testExtContext = mock(ExternalContext.class);
        when(m_FacesContext.getExternalContext()).thenReturn(testExtContext);
        when(testExtContext.getRequestParameterMap()).thenReturn(paramsMap);
        StreamedContent content =  m_SUT.getStreamPrimaryImage();
        assertThat(content.getContentType(), nullValue());
        assertThat(content.getStream(), nullValue());
    }
@ Test public void testGetStreamPrimaryImageWithNullMissionName ( ) { Map < String , String > paramsMap = new HashMap < String , String > ( ) ; ExternalContext testExtContext = mock ( ExternalContext . class ) ; when ( m_FacesContext . getExternalContext ( ) ) . thenReturn ( testExtContext ) ; when ( testExtContext . getRequestParameterMap ( ) ) . thenReturn ( paramsMap ) ; StreamedContent content = m_SUT . getStreamPrimaryImage ( ) ; assertThat ( content . getContentType ( ) , nullValue ( ) ) ; assertThat ( content . getStream ( ) , nullValue ( ) ) ; }
Verify that if a mission name cannot be found an empty default streamed content object
 is returned.
Verify that if a mission name cannot be found an empty default streamed content object is returned .
//Mock the image and mission template to be used. //Mocked methods. //Call to method being tested. Should return an empty StreamedContent object.