mil.dod.th.ose.config/test/mil/dod/th/ose/config/loading/impl/TestRemoteEventLoaderImpl.java
@Test
    public void testExceptionWhileLoading()
    {
        //exception mocking 
        doNothing().doThrow(NullPointerException.class).doNothing().doNothing()
            .when(m_RemoteEventAdmin).addRemoteEventRegistration(anyInt(), 
                Mockito.any(EventRegistrationRequestData.class));
        m_SUT.process(createEventConfigs());
        
        //verify
        verify(m_RemoteEventAdmin, times(4)).addRemoteEventRegistration(anyInt(), 
                Mockito.any(EventRegistrationRequestData.class));
        verify(m_Log).error(Mockito.any(NullPointerException.class), anyString(), anyObject());
    }
/**
     * Verify if one config fails to load that others are still loaded. 
     */
Verify if one config fails to load that others are still loaded.
Verify if one config fails to load that others are still loaded .
@Test
    public void testExceptionWhileLoading()
    {
        doNothing().doThrow(NullPointerException.class).doNothing().doNothing()
            .when(m_RemoteEventAdmin).addRemoteEventRegistration(anyInt(), 
                Mockito.any(EventRegistrationRequestData.class));
        m_SUT.process(createEventConfigs());
        verify(m_RemoteEventAdmin, times(4)).addRemoteEventRegistration(anyInt(), 
                Mockito.any(EventRegistrationRequestData.class));
        verify(m_Log).error(Mockito.any(NullPointerException.class), anyString(), anyObject());
    }
@ Test public void testExceptionWhileLoading ( ) { doNothing ( ) . doThrow ( NullPointerException . class ) . doNothing ( ) . doNothing ( ) . when ( m_RemoteEventAdmin ) . addRemoteEventRegistration ( anyInt ( ) , Mockito . any ( EventRegistrationRequestData . class ) ) ; m_SUT . process ( createEventConfigs ( ) ) ; verify ( m_RemoteEventAdmin , times ( 4 ) ) . addRemoteEventRegistration ( anyInt ( ) , Mockito . any ( EventRegistrationRequestData . class ) ) ; verify ( m_Log ) . error ( Mockito . any ( NullPointerException . class ) , anyString ( ) , anyObject ( ) ) ; }
Verify if one config fails to load that others are still loaded.
Verify if one config fails to load that others are still loaded .
//exception mocking  //verify