Exchange ex = createMock();
defaultExpectations(ex);
Mockito.when(ex.getContract().getProviderOperation().getName()).thenReturn(OPERATION_NAME);
_builder.notify(new ExchangeCompletionEvent(ex));
assertEquals(1, _switchYard.getMessageMetrics().getSuccessCount());
assertEquals(10.0, _switchYard.getMessageMetrics().getAverageProcessingTime(), 0);
ComponentService componentService = _switchYard.getApplication(TEST_APP).getComponentService(TEST_PROMOTED_SERVICE);
assertEquals(10.0, componentService.getMessageMetrics().getAverageProcessingTime(), 0);