mil.dod.th.ose.core/test/mil/dod/th/ose/core/xml/TestXsdResourceFinder.java
@Test
    public void testGetXsdResource() throws MalformedURLException
    {
        Bundle bundle = mock(Bundle.class);
        URL schemaUrl = new URL("file:schema.xsd");
        when(m_BundleContext.getBundle()).thenReturn(bundle);
        when(bundle.getResource(Mockito.anyString())).thenReturn(schemaUrl);
        
        assertThat(XsdResourceFinder.getXsdResource(
                m_BundleContext, SetPanTiltCommand.class), is(schemaUrl));
    }
/**
     * Verify looking up and returning of a URL resource given the bundle and class. 
     */
Verify looking up and returning of a URL resource given the bundle and class.
Verify looking up and returning of a URL resource given the bundle and class .
@Test
    public void testGetXsdResource() throws MalformedURLException
    {
        Bundle bundle = mock(Bundle.class);
        URL schemaUrl = new URL("file:schema.xsd");
        when(m_BundleContext.getBundle()).thenReturn(bundle);
        when(bundle.getResource(Mockito.anyString())).thenReturn(schemaUrl);
        assertThat(XsdResourceFinder.getXsdResource(
                m_BundleContext, SetPanTiltCommand.class), is(schemaUrl));
    }
@ Test public void testGetXsdResource ( ) throws MalformedURLException { Bundle bundle = mock ( Bundle . class ) ; URL schemaUrl = new URL ( "file:schema.xsd" ) ; when ( m_BundleContext . getBundle ( ) ) . thenReturn ( bundle ) ; when ( bundle . getResource ( Mockito . anyString ( ) ) ) . thenReturn ( schemaUrl ) ; assertThat ( XsdResourceFinder . getXsdResource ( m_BundleContext , SetPanTiltCommand . class ) , is ( schemaUrl ) ) ; }
Verify looking up and returning of a URL resource given the bundle and class.
Verify looking up and returning of a URL resource given the bundle and class .