Log4jLogger implements GraphHook { @Override public <T> T postExecute(final T result, final OperationChain<?> operationChain, final Context context) { return result; }  @Override void preExecute(final OperationChain<?> opChain, final Context context); @Override T postExecute(final T result, final OperationChain<?> operationChain, final Context context); @Override T onFailure(final T result, final OperationChain<?> opChain, final Context context, final Exception e);  }
@Test public void shouldReturnResultWithoutModification() { final Log4jLogger hook = getTestObject(); final Object result = mock(Object.class); final OperationChain opChain = new OperationChain.Builder() .first(new GenerateObjects<>()) .build(); final Object returnedResult = hook.postExecute(result, opChain, new Context(new User())); assertSame(result, returnedResult); }