@Test
public void testCountAllDataSetsSizeWhenRepoContainsMultipleElements() throws Exception {

    // given
    // info: data set size for test is 120345 in its metadata
    for (int i = 1; i <= 3; i++) {
        repository.save(getMetadata(String.valueOf(i)));
    }
    DataSetMetadata metadataWithDifferentDataSetSize = getMetadata("4");
    metadataWithDifferentDataSetSize.setDataSetSize(5127892);
    repository.save(metadataWithDifferentDataSetSize);
    // when
    long totalSize = repository.countAllDataSetsSize();
    // then
    assertThat(totalSize, is(5488927L));
}