@Test
public void shouldList() throws IOException {

    // list nothing
    final Iterator<DataSetMetadata> emptyList = repository.list().iterator();
    assertFalse(emptyList.hasNext());
    // given
    int expected = 26;
    for (int i = 1; i <= expected; i++) {
        repository.save(getMetadata(String.valueOf(i)));
    }
    // when
    final Iterator<DataSetMetadata> actual = repository.list().iterator();
    // then
    final AtomicInteger count = new AtomicInteger(0); // need of a final object that can be incremented in the
                                                      // following lambda expression
    actual.forEachRemaining(dataSetMetadata -> {
        assertTrue(Integer.valueOf(dataSetMetadata.getId()) <= expected);
        count.addAndGet(1);
        /*assertFalse(dataSetMetadata.isSharedDataSet());
        assertNotNull(dataSetMetadata.getOwner());
        assertEquals(dataSetMetadata.getAuthor(), dataSetMetadata.getOwner().getFirstName());*/
    });
    assertEquals(expected, count.intValue());
}