VoidFlattrCallable extends AbstractFlattrCallable<Void> { public abstract void execute(FlattrService service) throws Exception;  abstract void execute(FlattrService service); @Override Void call(FlattrService service);  }
@Test public void testExecute() throws Exception { final FlattrService mockService = mock(FlattrService.class); VoidFlattrCallable callable = new VoidFlattrCallable() { @Override public void execute(FlattrService service) throws Exception { assertThat(service, sameInstance(mockService)); executed = true; } }; executed = false; Void result = callable.call(mockService); assertThat(executed, is(true)); assertThat(result, nullValue()); }