ImmutableInvocationMapping implements InvocationMapping<K, E> { @Override public String toString() { return method + " -> " + operation; } ImmutableInvocationMapping(Method method, DataStoreOperation<?, K, E> operation); @Override Method getMethod(); @Override DataStoreOperation<?, K, E> getOperation(); @Override String toString();  }
@Test public void testToString() throws Exception { final String string = "string representation"; final Method method = ReturnTypeSampleRepository.class.getMethod("doSomething"); final ImmutableInvocationMapping<Object, Object> mapping = new ImmutableInvocationMapping<>(method, new StringifiableDataStoreOperation<>( string)); assertThat(mapping.toString(), is(method.toString() + " -> " + string)); }