HttpServletResponse outboundResponse = EasyMock.createNiceMock( HttpServletResponse.class );
EasyMock.replay( outboundResponse );
HttpClientDispatch dispatch = new HttpClientDispatch();
try {
dispatch.doGet( new URI( uri ), inboundRequest, outboundResponse );
fail( "Expected exception while accessing to unreachable host" );
} catch ( IOException e ) {
Iterator<LoggingEvent> iterator = CollectAppender.queue.iterator();
LoggingEvent failureEvent = iterator.next();
verifyValue( (String) failureEvent.getMDC( AuditConstants.MDC_RESOURCE_NAME_KEY ), uri );