EncryptedValueDataService { public Slice<EncryptedValue> findByCanaryUuids(final List<UUID> canaryUuids) { return encryptedValueRepository .findByEncryptionKeyUuidIn(canaryUuids, PageRequest.of(0, EncryptedValueRepository.BATCH_SIZE) ); } @Autowired protected  EncryptedValueDataService(
    final EncryptedValueRepository encryptedValueRepository,
    final Encryptor encryptor); Long countAllByCanaryUuid(final UUID uuid); Slice<EncryptedValue> findByCanaryUuids(final List<UUID> canaryUuids); void rotate(final EncryptedValue encryptedValue);  }
@Test public void findByCanaryUuids() throws Exception { final List<UUID> canaryUuids = Collections.singletonList(UUID.randomUUID()); final Slice<EncryptedValue> encryptedValues = new SliceImpl(Collections.singletonList(new EncryptedValue())); when(encryptedValueRepository.findByEncryptionKeyUuidIn(eq(canaryUuids), any())).thenReturn(encryptedValues); assertThat(subject.findByCanaryUuids(canaryUuids), equalTo(encryptedValues)); }