/**
*
*/
@Test
@SuppressWarnings(CompilerWarnings.UNUSED)
public void shouldRequireNonNullCache() {
// given
final ConcurrentMap<Long, Integer> cache = null;
final LongToIntFunction function = input -> 123;
final LongFunction<Long> keyFunction = Long::valueOf;
// when
thrown.expect(NullPointerException.class);
thrown.expectMessage("Provide an empty map instead of NULL.");
// then
new ConcurrentMapBasedLongToIntFunctionMemoizer<>(cache, keyFunction, function);
}
ConcurrentMapBasedLongToIntFunctionMemoizerTest.java 文件源码
java
阅读 52
收藏 0
点赞 0
评论 0
项目:memoization.java
作者:
评论列表
文章目录