### Question:
ConsumerBindingRepository extends DefaultRepository<ConsumerBinding, ConsumerBindingKey, Entity.ConsumerBindingKey, DefaultSpecification> implements com.expediagroup.streamplatform.streamregistry.repository.ConsumerBindingRepository { @Override public List<ConsumerBinding> findAll(ConsumerBinding example) { return findAll().stream() .filter(cb -> cb.getKey().getConsumerKey().equals(example.getKey().getConsumerKey())) .collect(toList()); } ConsumerBindingRepository(EntityView view, EventSender sender, ConsumerBindingConverter converter); @Override List<ConsumerBinding> findAll(ConsumerBinding example);  }### Answer:
@Test public void findAllMatch() { ConsumerBinding consumerBinding = SampleModel.consumerBinding(); doReturn(List.of(consumerBinding)).when(underTest).findAll(); List<ConsumerBinding> result = underTest.findAll(SampleModel.consumerBinding()); assertThat(result.size(), is(1)); assertThat(result.get(0), is(SampleModel.consumerBinding())); }
@Test public void findAllNoMatch() { ConsumerBinding consumerBinding = SampleModel.consumerBinding(); consumerBinding.getKey().setConsumerName("different consumer"); doReturn(List.of(consumerBinding)).when(underTest).findAll(); List<ConsumerBinding> result = underTest.findAll(SampleModel.consumerBinding()); assertThat(result.size(), is(0)); }