### Question:
ProducerBindingRepository extends DefaultRepository<ProducerBinding, ProducerBindingKey, Entity.ProducerBindingKey, DefaultSpecification> implements com.expediagroup.streamplatform.streamregistry.repository.ProducerBindingRepository { @Override public List<ProducerBinding> findAll(ProducerBinding example) { return findAll().stream() .filter(pb -> pb.getKey().getProducerKey().equals(example.getKey().getProducerKey())) .collect(toList()); } ProducerBindingRepository(EntityView view, EventSender sender, ProducerBindingConverter converter); @Override List<ProducerBinding> findAll(ProducerBinding example);  }### Answer:
@Test public void findAllMatch() { ProducerBinding producerBinding = SampleModel.producerBinding(); doReturn(List.of(producerBinding)).when(underTest).findAll(); List<ProducerBinding> result = underTest.findAll(SampleModel.producerBinding()); assertThat(result.size(), is(1)); assertThat(result.get(0), is(SampleModel.producerBinding())); }
@Test public void findAllNoMatch() { ProducerBinding producerBinding = SampleModel.producerBinding(); producerBinding.getKey().setProducerName("different producer"); doReturn(List.of(producerBinding)).when(underTest).findAll(); List<ProducerBinding> result = underTest.findAll(SampleModel.producerBinding()); assertThat(result.size(), is(0)); }