VoidResultAdapter extends AbstractResultAdapter<Object> { @Override public Object adapt(Invocation invocation, Object originalValue) { return null; } VoidResultAdapter(); @Override boolean accepts(Invocation invocation, Object originalValue); @Override Object adapt(Invocation invocation, Object originalValue);  }
@Test public void testAdapting() throws Exception { final VoidResultAdapter adapter = new VoidResultAdapter(); final Object adapted = adapter.adapt( new ImmutableInvocation(ReturnTypeSampleRepository.class.getMethod("doSomething"), new Object[]{}), new Object()); assertThat(adapted, is(nullValue())); }