AsynchronousEventListenerDecorator implements EventListener<T> { @SuppressWarnings("deprecation") public void onEvent(T event) { new RunnableAsyncTaskAdaptor(handler, new EventListenerRunnable<T>(event, eventListener)).execute(); } AsynchronousEventListenerDecorator(EventListener<T> eventListener);  AsynchronousEventListenerDecorator(Handler handler, EventListener<T> eventListener); @SuppressWarnings("deprecation") void onEvent(T event);  }
@SuppressWarnings("deprecation") @Test public void onEventTest(){ reset(eventListener); decorator.onEvent( new Object() ); verify(eventListener,Mockito.never()).onEvent( Mockito.anyObject()); }