mil.dod.th.ose.core/test/mil/dod/th/ose/core/xml/TestXsdResourceFinder.java
@Test
    public void testGetXsdResourceIllegalState() throws MalformedURLException
    {
        Bundle bundle = mock(Bundle.class);
        when(m_BundleContext.getBundle()).thenReturn(bundle);
        when(bundle.getResource(Mockito.anyString())).thenReturn(null);
        
        try
        {
            XsdResourceFinder.getXsdResource(m_BundleContext, SetPanTiltCommand.class);
            fail("Expected exception resource should be null per mocking.");
        }
        catch(IllegalStateException e)
        {
            
        }              
    }
/**
     * Verify that if the resource cannot be found that there is an exception. 
     */
Verify that if the resource cannot be found that there is an exception.
Verify that if the resource cannot be found that there is an exception .
@Test
    public void testGetXsdResourceIllegalState() throws MalformedURLException
    {
        Bundle bundle = mock(Bundle.class);
        when(m_BundleContext.getBundle()).thenReturn(bundle);
        when(bundle.getResource(Mockito.anyString())).thenReturn(null);
        try
        {
            XsdResourceFinder.getXsdResource(m_BundleContext, SetPanTiltCommand.class);
            fail("Expected exception resource should be null per mocking.");
        }
        catch(IllegalStateException e)
        {
        }              
    }
@ Test public void testGetXsdResourceIllegalState ( ) throws MalformedURLException { Bundle bundle = mock ( Bundle . class ) ; when ( m_BundleContext . getBundle ( ) ) . thenReturn ( bundle ) ; when ( bundle . getResource ( Mockito . anyString ( ) ) ) . thenReturn ( null ) ; try { XsdResourceFinder . getXsdResource ( m_BundleContext , SetPanTiltCommand . class ) ; fail ( "Expected exception resource should be null per mocking." ) ; } catch ( IllegalStateException e ) { } }
Verify that if the resource cannot be found that there is an exception.
Verify that if the resource cannot be found that there is an exception .