mil.dod.th.ose.core/test/mil/dod/th/ose/core/impl/xml/TestXmlUnmarshalServiceImpl.java
@Test
    public void testGetXmlObjectNoSchema() throws SAXException, JAXBException
    {
        byte[] array = { 0x1 };
        
        // mock bundle to return null
        when(m_bunMock.getResource(anyString())).thenReturn(null);
        
        try
        {
            m_SUT.getXmlObject(getClass(), array);
            fail("Expecting exception as class does not have schema");
        }
        catch (IllegalStateException e)
        {
        }      
    }
/**
     * Verify exception will be thrown if trying to get object of an invalid type (no schema)
     */
Verify exception will be thrown if trying to get object of an invalid type (no schema)
Verify exception will be thrown if trying to get object of an invalid type ( no schema )
@Test
    public void testGetXmlObjectNoSchema() throws SAXException, JAXBException
    {
        byte[] array = { 0x1 };
        when(m_bunMock.getResource(anyString())).thenReturn(null);
        try
        {
            m_SUT.getXmlObject(getClass(), array);
            fail("Expecting exception as class does not have schema");
        }
        catch (IllegalStateException e)
        {
        }      
    }
@ Test public void testGetXmlObjectNoSchema ( ) throws SAXException , JAXBException { byte [ ] array = { 0x1 } ; when ( m_bunMock . getResource ( anyString ( ) ) ) . thenReturn ( null ) ; try { m_SUT . getXmlObject ( getClass ( ) , array ) ; fail ( "Expecting exception as class does not have schema" ) ; } catch ( IllegalStateException e ) { } }
Verify exception will be thrown if trying to get object of an invalid type (no schema)
Verify exception will be thrown if trying to get object of an invalid type ( no schema )
// mock bundle to return null