mil.dod.th.ose.shared/test/mil/dod/th/ose/shared/TestExceptionUtil.java
@Test
    public void testHandleExecutorException()
    {
        final LoggingService log = LoggingServiceMocker.createMock();
        final Exception ex = new Exception("Something went horribly wrong...");
        final Future<?> future = mock(Future.class, withSettings().extraInterfaces(Runnable.class));
        
        ExceptionUtil.handleExecutorExceptions(log, (Runnable)future, ex);
        verify(log).error(ex, "Executor threw an exception");
    }
/**
     * Verify the handle executor exception method logs the exception appropriately.
     */
Verify the handle executor exception method logs the exception appropriately.
Verify the handle executor exception method logs the exception appropriately .
@Test
    public void testHandleExecutorException()
    {
        final LoggingService log = LoggingServiceMocker.createMock();
        final Exception ex = new Exception("Something went horribly wrong...");
        final Future<?> future = mock(Future.class, withSettings().extraInterfaces(Runnable.class));
        ExceptionUtil.handleExecutorExceptions(log, (Runnable)future, ex);
        verify(log).error(ex, "Executor threw an exception");
    }
@ Test public void testHandleExecutorException ( ) { final LoggingService log = LoggingServiceMocker . createMock ( ) ; final Exception ex = new Exception ( "Something went horribly wrong..." ) ; final Future < ? > future = mock ( Future . class , withSettings ( ) . extraInterfaces ( Runnable . class ) ) ; ExceptionUtil . handleExecutorExceptions ( log , ( Runnable ) future , ex ) ; verify ( log ) . error ( ex , "Executor threw an exception" ) ; }
Verify the handle executor exception method logs the exception appropriately.
Verify the handle executor exception method logs the exception appropriately .