@Test
public void mapUuidsToKeys_whenThereIsNoActiveKey() throws Exception {

  final List<EncryptionKeyMetadata> keys = asList(existingKey1Data, existingKey2Data);
  activeProvider.setKeys(keys);
  final List<EncryptionKeyProvider> providers = asList(activeProvider);
  when(encryptionKeysConfiguration.isKeyCreationEnabled()).thenReturn(true);
  when(encryptionKeysConfiguration.getProviders()).thenReturn(providers);
  subject = new EncryptionKeyCanaryMapper(encryptionKeyCanaryDataService,
    encryptionKeysConfiguration, timedRetry, providerFactory);
  exception.expectMessage("No active key was found");
  subject.mapUuidsToKeys(keySet);
}