@Test
public void shouldClear() throws IOException {

    // given
    assertEquals(0, repository.size());
    int count = 11;
    for (int i = 1; i <= count; i++) {
        repository.save(getMetadata(String.valueOf(i)));
    }
    assertEquals(count, repository.size());
    // when
    repository.clear();
    assertEquals(0, repository.size());
}