MemoizationDefaults { public static <INPUT> ObjIntFunction<INPUT, String> objIntConsumerHashCodeKeyFunction() { return (first, second) -> { final int firstHashCode = Objects.hashCode(first); final int secondHashCode = Integer.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 shouldDefineObjIntConsumerHashCodeKeyFunction() { ObjIntFunction<Object, String> keyFunction; keyFunction = MemoizationDefaults.objIntConsumerHashCodeKeyFunction(); Assert.assertNotNull("Default key function is NULL", keyFunction); }
@Test public void shouldConcatObjIntConsumerHashCodesWithWhitespaceInbetween() { final ObjIntFunction<Object, String> keyFunction = MemoizationDefaults .objIntConsumerHashCodeKeyFunction(); final String calculatedKey = keyFunction.apply(Integer.valueOf(1), 123); Assert.assertEquals("Calculated key does not match expectations", "1 123", calculatedKey); }