@Test
public void simple_getBulkIdentified() throws ExecutionException, InterruptedException {
final CompletionStage<Boolean> put1 = cache.put("josie", "football", PutPolicy.PUT_ALWAYS);
assertThat(put1, successfulWith(is(true)));
final CompletionStage<Optional<IdentifiedValue<String>>> get1 = cache.getIdentified("josie");
assertThat(get1, successful());
final IdentifiedValue<String> iv1 = unsafeJoin(get1).get();
assertThat(iv1.identifier(), notNullValue());
assertThat(iv1.value(), is("football"));
final CompletionStage<Map<String, Optional<IdentifiedValue<String>>>> get2 =
cache.getBulkIdentified("claira", "josie", "jasmin");
assertThat(get2, successful());
final Map<String, Optional<IdentifiedValue<String>>> ivMap1 = unsafeJoin(get2);
assertThat(ivMap1.keySet(), containsInAnyOrder("jasmin", "claira", "josie"));
assertThat(ivMap1.get("claira"), is(Optional.empty()));
assertThat(ivMap1.get("jasmin"), is(Optional.empty()));
final IdentifiedValue<String> iv2 = ivMap1.get("josie").get();
assertThat(iv2.identifier(), notNullValue());
assertThat(iv2.identifier(), equalTo(iv1.identifier()));
assertThat(iv2.value(), is("football"));
final Map<MetricLabel, ? extends LongMetric> cacheMetrics =
requestMetrics().allExternalCacheLongMetrics().get(CACHE_NAME);
assertThat(cacheMetrics, hasMetric(MetricLabel.TIMED_IDENTIFIED_GET_CALL, is(2L), greaterThan(0L)));
assertThat(cacheMetrics, hasMetric(MetricLabel.TIMED_PUT_CALL, is(1L), greaterThan(0L)));
assertThat(cacheMetrics, hasMetric(MetricLabel.TIMED_REMOVE_ALL_CALL, is(1L), greaterThan(0L)));
assertThat(cacheMetrics, hasMetric(MetricLabel.NUMBER_OF_HITS, is(2L), is(2L)));
assertThat(cacheMetrics, hasMetric(MetricLabel.NUMBER_OF_MISSES, is(1L), is(2L)));
assertThat(cacheMetrics, hasSize(is(5)));
}