@Test
public void testGetItemInfosAllCached() throws IOException {

  List<StorageResourceId> requestedIds =
      Lists.newArrayList(ITEM_A_A.getResourceId(), ITEM_A_B.getResourceId());
  List<GoogleCloudStorageItemInfo> expected = Lists.newArrayList(ITEM_A_A, ITEM_A_B);
  // Prepare the cache.
  cache.putItem(ITEM_A_A);
  cache.putItem(ITEM_A_B);
  List<GoogleCloudStorageItemInfo> result = gcs.getItemInfos(requestedIds);
  // Verify the result is exactly what the delegate returns in order.
  assertThat(result).containsExactlyElementsIn(expected).inOrder();
  // Verify the state of the cache.
  assertThat(cache.getAllItemsRaw()).containsExactlyElementsIn(expected);
}