@Test
public void mapUuidsToKeys_shouldCreateTheKeys() throws Exception {

  when(encryptionKeysConfiguration.isKeyCreationEnabled()).thenReturn(true);
  when(encryptionKeysConfiguration.getProviders()).thenReturn(asList(activeProvider));
  subject = new EncryptionKeyCanaryMapper(encryptionKeyCanaryDataService,
    encryptionKeysConfiguration, timedRetry, providerFactory);
  subject.mapUuidsToKeys(keySet);
  final Collection<EncryptionKey> keys = keySet.getKeys();
  assertThat(keys.size(), equalTo(3));
  assertThat(keys.stream().map(EncryptionKey::getKey).collect(Collectors.toList()), containsInAnyOrder(
    activeKey, existingKey1, existingKey2
  ));
}