@Test
public void returnsMultipleSecretsWhenAllowed() throws Exception {

    SanitizedSecret sanitizedSecret = SanitizedSecret.fromSecret(secret);
    SanitizedSecret sanitizedSecret2 = SanitizedSecret.fromSecret(secret2);
    ImmutableList<String> secretnames = ImmutableList.of(sanitizedSecret.name(), sanitizedSecret2.name());
    BatchSecretRequest req = BatchSecretRequest.create(secretnames);
    when(aclDAO.getBatchSanitizedSecretsFor(client, secretnames))
            .thenReturn(List.of(sanitizedSecret, sanitizedSecret2));
    when(clientDAO.getClientByName(client.getName())).thenReturn(Optional.of(client));
    when(secretController.getSecretsByName(secretnames))
            .thenReturn(List.of(secret, secret2));
    List<SecretDeliveryResponse> response = batchSecretDeliveryResource.getBatchSecret(client, req);
    assertThat(response).containsExactlyInAnyOrder(SecretDeliveryResponse.fromSecret(secret), SecretDeliveryResponse.fromSecret(secret2));
}