ScoreOperationChainHandler implements OutputOperationHandler<ScoreOperationChain, Integer> { public static Map<Class<? extends Operation>, ScoreResolver> getDefaultScoreResolvers() { return Collections.unmodifiableMap(DEFAULT_SCORE_RESOLVERS); }  @Override Integer doOperation(final ScoreOperationChain operation, final Context context, final Store store); int getChainScore(final Operations<?> operations, final User user); int getMaxUserAuthScore(final Set<String> opAuths); @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); void validateOpScores(); static Map<Class<? extends Operation>, ScoreResolver> getDefaultScoreResolvers();  }
@Test public void shouldAddDefaultScoreResolvers() { final Map<Class<? extends Operation>, ScoreResolver> defaultResolvers = ScoreOperationChainHandler.getDefaultScoreResolvers(); assertTrue(defaultResolvers.keySet().contains(NamedOperation.class)); assertNotNull(defaultResolvers.get(NamedOperation.class)); assertTrue(defaultResolvers.get(NamedOperation.class) instanceof NamedOperationScoreResolver); }