@Test public void withoutSpanStoreAndCallback() throws Exception { Exception exception = new Exception(); removeOriginalCallback(); proxy.failed(exception); verify(spanStoreAdapter).getSpanStore(); verifyNoMoreInteractions(spanStoreAdapter); verifyZeroInteractions(spanStore, originalCallback); } }
@Test public void withoutSpanStore() throws Exception { Exception exception = new Exception(); proxy.failed(exception); verify(spanStoreAdapter).getSpanStore(); verify(originalCallback).failed(exception); verifyNoMoreInteractions(spanStoreAdapter, originalCallback); verifyZeroInteractions(spanStore); }
@Test public void successful() throws Exception { Exception exception = new Exception(); when(spanStoreAdapter.getSpanStore()).thenReturn(spanStore); proxy.failed(exception); verify(spanStoreAdapter).getSpanStore(); verify(spanStore).finishSpan((TagsProvidingAdapter) any()); verify(originalCallback).failed(exception); verifyNoMoreInteractions(spanStore, spanStoreAdapter, originalCallback); }