@Test
public void shouldAddOccurrenceNumberToAutoGeneratedNameWhenMultipleRepositoriesWithSameClassProvided() {

    // given
    ParamRepository repository = mock(ParamRepository.class);
    String repositoryClassName = repository.getClass().getSimpleName();
    NamedParamRepositoryFactory factory = new NamedParamRepositoryFactory();
    factory.create(repository);
    // when
    NamedParamRepository namedRepository1 = factory.create(repository);
    NamedParamRepository namedRepository2 = factory.create(repository);
    // then
    assertThat(namedRepository1).hasName(repositoryClassName + "1");
    assertThat(namedRepository2).hasName(repositoryClassName + "2");
}