@Test
public void shouldFilterOutRepositoriesAssignableFromStoredClassWhenConstructingStore() {

    // given
    ParamRepository editableRepository = new FakeEditableParamRepository();
    List<NamedParamRepository> repositories = Arrays.asList(
            namedRepository(editableRepository).named("fakeRepo").build(),
            NamedParamRepositoryBuilder.namedRepository(new FakeViewableParamRepository()).build()
    );
    // when
    RepositoryStore<EditableParamRepository> store = new RepositoryStore<EditableParamRepository>(
            repositories, EditableParamRepository.class);
    // then
    assertThat(store.storedRepositories()).containsOnly(new RepositoryName("fakeRepo"));
}