MemoizationDefaults { public static DoubleBinaryFunction<String> doubleBinaryOperatorHashCodeKeyFunction() { return (first, second) -> { final int firstHashCode = Double.valueOf(first).hashCode(); final int secondHashCode = Double.valueOf(second).hashCode(); return firstHashCode + " " + secondHashCode; }; } private  MemoizationDefaults(); static Supplier<String> defaultKeySupplier(); static BiFunction<T, U, String> hashCodeKeyFunction(); static ObjDoubleFunction<INPUT, String> objDoubleConsumerHashCodeKeyFunction(); static ObjIntFunction<INPUT, String> objIntConsumerHashCodeKeyFunction(); static ObjLongFunction<INPUT, String> objLongConsumerHashCodeKeyFunction(); static DoubleBinaryFunction<String> doubleBinaryOperatorHashCodeKeyFunction(); static IntBinaryFunction<String> intBinaryOperatorHashCodeKeyFunction(); static LongBinaryFunction<String> longBinaryOperatorHashCodeKeyFunction();  }
@Test public void shouldConcatDoubleBinaryOperatorHashCodesWithWhitespaceInbetween() { final DoubleBinaryFunction<String> keyFunction = MemoizationDefaults .doubleBinaryOperatorHashCodeKeyFunction(); final String calculatedKey = keyFunction.apply(123.456D, 789.123D); Assert.assertEquals("Calculated key does not match expectations", "1522623320 -1478220865", calculatedKey); }