### Question:
DefaultRepository implements com.expediagroup.streamplatform.streamregistry.repository.Repository<ME, MK> { @Override public List<ME> findAll() { return view.all(stateKeyClass) .map(converter::convertEntity) .collect(toList()); }  @Override ME save(ME entity); @Override Optional<ME> findById(MK key); @Override List<ME> findAll(); @Override List<ME> findAll(ME example);  }### Answer:
@Test public void findAll() { when(view.all(Entity.DomainKey.class)).thenReturn(Stream.of(SampleState.domain())); List<Domain> result = underTest.findAll(); assertThat(result.size(), is(1)); assertThat(result.get(0), is(SampleModel.domain())); }
@Test(expected = UnsupportedOperationException.class) public void findAllExample() { underTest.findAll(null); }