mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/util/TestMetatypeInformationListener.java
@Test
    public void testMissingPID() throws InterruptedException, IOException, SAXException, URISyntaxException
    {
        //mock behavior
        when(m_XMLParsingService.getPidAttribute(m_TestURL.toURI())).thenReturn(null);

        //handle event
        m_BundleHandler.handleEvent(xmlServiceEventUpdate());
        
        //wait for thread to finish
        Thread.sleep(100);
        
        //verify event posted with expected data
        verify(m_EventAdmin, never()).postEvent(Mockito.any(Event.class));
    }
/**
     * Test a bundle event where the bundle is adjudicated to have xml data, but the PID is not set.
     */
Test a bundle event where the bundle is adjudicated to have xml data, but the PID is not set.
Test a bundle event where the bundle is adjudicated to have xml data but the PID is not set .
@Test
    public void testMissingPID() throws InterruptedException, IOException, SAXException, URISyntaxException
    {
        when(m_XMLParsingService.getPidAttribute(m_TestURL.toURI())).thenReturn(null);
        m_BundleHandler.handleEvent(xmlServiceEventUpdate());
        Thread.sleep(100);
        verify(m_EventAdmin, never()).postEvent(Mockito.any(Event.class));
    }
@ Test public void testMissingPID ( ) throws InterruptedException , IOException , SAXException , URISyntaxException { when ( m_XMLParsingService . getPidAttribute ( m_TestURL . toURI ( ) ) ) . thenReturn ( null ) ; m_BundleHandler . handleEvent ( xmlServiceEventUpdate ( ) ) ; Thread . sleep ( 100 ) ; verify ( m_EventAdmin , never ( ) ) . postEvent ( Mockito . any ( Event . class ) ) ; }
Test a bundle event where the bundle is adjudicated to have xml data, but the PID is not set.
Test a bundle event where the bundle is adjudicated to have xml data but the PID is not set .
//mock behavior //handle event //wait for thread to finish //verify event posted with expected data