### Question:
CurrencyParameterSensitivitiesTokenEvaluator extends TokenEvaluator<CurrencyParameterSensitivities> { @Override public EvaluationResult evaluate( CurrencyParameterSensitivities sensitivities, CalculationFunctions functions, String firstToken, List<String> remainingTokens) { List<CurrencyParameterSensitivity> matchingSensitivities = sensitivities.getSensitivities().stream() .filter(sensitivity -> matchesToken(sensitivity, firstToken)) .collect(toImmutableList()); switch (matchingSensitivities.size()) { case 0: return invalidTokenFailure(sensitivities, firstToken); case 1: return EvaluationResult.success(matchingSensitivities.get(0), remainingTokens); default: return EvaluationResult.success(CurrencyParameterSensitivities.of(matchingSensitivities), remainingTokens); } }  @Override Class<?> getTargetType(); @Override Set<String> tokens(CurrencyParameterSensitivities sensitivities); @Override EvaluationResult evaluate(
      CurrencyParameterSensitivities sensitivities,
      CalculationFunctions functions,
      String firstToken,
      List<String> remainingTokens);  }### Answer:
@Test public void evaluate() { CurrencyParameterSensitivity sensitivity1 = CurrencyParameterSensitivity.of(CurveName.of("curve1"), Currency.AUD, DoubleArray.EMPTY); CurrencyParameterSensitivity sensitivity2 = CurrencyParameterSensitivity.of(CurveName.of("curve2"), Currency.CHF, DoubleArray.EMPTY); CurrencyParameterSensitivity sensitivity3 = CurrencyParameterSensitivity.of(CurveName.of("curve2"), Currency.AUD, DoubleArray.EMPTY); CurrencyParameterSensitivities sensitivities = CurrencyParameterSensitivities.of(sensitivity1, sensitivity2, sensitivity3); CurrencyParameterSensitivitiesTokenEvaluator evaluator = new CurrencyParameterSensitivitiesTokenEvaluator(); CurrencyParameterSensitivities expected1 = CurrencyParameterSensitivities.of(sensitivity1, sensitivity3); EvaluationResult result1 = evaluator.evaluate(sensitivities, FUNCTIONS, "aud", ImmutableList.of()); assertThat(result1.getResult()).isSuccess(); CurrencyParameterSensitivities result1Value = (CurrencyParameterSensitivities) result1.getResult().getValue(); assertThat(result1Value.getSensitivities()).containsAll(expected1.getSensitivities()); CurrencyParameterSensitivities expected2 = CurrencyParameterSensitivities.of(sensitivity2, sensitivity3); EvaluationResult result2 = evaluator.evaluate(sensitivities, FUNCTIONS, "curve2", ImmutableList.of()); assertThat(result2.getResult()).isSuccess(); CurrencyParameterSensitivities result2Value = (CurrencyParameterSensitivities) result2.getResult().getValue(); assertThat(result2Value.getSensitivities()).containsAll(expected2.getSensitivities()); EvaluationResult result3 = evaluator.evaluate(sensitivities, FUNCTIONS, "chf", ImmutableList.of()); assertThat(result3.getResult()).hasValue(sensitivity2); EvaluationResult result4 = evaluator.evaluate(sensitivities, FUNCTIONS, "usd", ImmutableList.of()); assertThat(result4.getResult()).isFailure(); }