@Test
public void testGetItemsWithCounts() {

    final List<BucketItemEntity> items = metadataService.getBucketItems(new HashSet<>(Arrays.asList("1", "2")));
    assertNotNull(items);
    // 3 items across all buckets
    assertEquals(3, items.size());
    final BucketItemEntity item1 = items.stream().filter(i -> i.getId().equals("1")).findFirst().orElse(null);
    assertNotNull(item1);
    assertEquals(BucketItemEntityType.FLOW, item1.getType());
    final FlowEntity flowEntity = (FlowEntity) item1;
    assertEquals(3, flowEntity.getSnapshotCount());
    items.stream().forEach(i -> assertNotNull(i.getBucketName()));
}