OperationChainLimiter implements GraphHook { @Override public <T> T postExecute(final T result, final OperationChain<?> opChain, final Context context) { return result; }  @Override void preExecute(final OperationChain<?> opChain, final Context context); @Override T postExecute(final T result, final OperationChain<?> opChain, final Context context); @Override T onFailure(final T result, final OperationChain<?> opChain, final Context context, final Exception e); @JsonIgnore Map<Class<? extends Operation>, Integer> getOpScores(); @JsonIgnore void setOpScores(final Map<Class<? extends Operation>, Integer> opScores); @JsonGetter("opScores") Map<String, Integer> getOpScoresAsStrings(); @JsonSetter("opScores") void setOpScoresFromStrings(final Map<String, Integer> opScores); Map<String, Integer> getAuthScores(); void setAuthScores(final Map<String, Integer> authScores); Map<Class<? extends Operation>, ScoreResolver> getScoreResolvers(); void setScoreResolvers(final Map<Class<? extends Operation>, ScoreResolver> resolvers);  }
@Test public void shouldReturnResultWithoutModification() { final OperationChainLimiter hook = fromJson(OP_CHAIN_LIMITER_PATH); final Object result = mock(Object.class); final OperationChain opChain = new OperationChain.Builder() .first(new GenerateObjects<>()) .build(); final User user = new User.Builder() .opAuths("NoScore") .build(); final Object returnedResult = hook.postExecute(result, opChain, new Context(user)); assertSame(result, returnedResult); }