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