mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/mp/TestTemplateProgramManagerImpl.java
private URL templateUrl(final MissionProgramTemplate template) throws MalformedURLException, UnmarshalException, 
        URISyntaxException
    {
        File localFile = mock(File.class);
        URL url = new URL("file:asdfs3");
        
        //mocking behavior
        when(m_FileService.getFile("file:hidy")).thenReturn(localFile);
        when(localFile.toURI()).thenReturn(url.toURI());
        when(m_UnmarshalService.getXmlObject(MissionProgramTemplate.class, url)).thenReturn(template);
        return url;
    }
/**
     * Mock out a file to template interaction.
     */
Mock out a file to template interaction.
Mock out a file to template interaction .
private URL templateUrl(final MissionProgramTemplate template) throws MalformedURLException, UnmarshalException, 
        URISyntaxException
    {
        File localFile = mock(File.class);
        URL url = new URL("file:asdfs3");
        when(m_FileService.getFile("file:hidy")).thenReturn(localFile);
        when(localFile.toURI()).thenReturn(url.toURI());
        when(m_UnmarshalService.getXmlObject(MissionProgramTemplate.class, url)).thenReturn(template);
        return url;
    }
private URL templateUrl ( final MissionProgramTemplate template ) throws MalformedURLException , UnmarshalException , URISyntaxException { File localFile = mock ( File . class ) ; URL url = new URL ( "file:asdfs3" ) ; when ( m_FileService . getFile ( "file:hidy" ) ) . thenReturn ( localFile ) ; when ( localFile . toURI ( ) ) . thenReturn ( url . toURI ( ) ) ; when ( m_UnmarshalService . getXmlObject ( MissionProgramTemplate . class , url ) ) . thenReturn ( template ) ; return url ; }
Mock out a file to template interaction.
Mock out a file to template interaction .
//mocking behavior