@Test
public void getGenerationParameters_decryptsGenerationParameters() {

  final EncryptedValue parameterEncryption = new EncryptedValue(ENCRYPTION_KEY_UUID, ENCRYPTED_GENERATION_PARAMS, PARAMETERS_NONCE);
  final EncryptedValue passwordEncryption = new EncryptedValue(ENCRYPTION_KEY_UUID, ENCRYPTED_PASSWORD, NONCE);
  when(encryptor.decrypt(parameterEncryption))
    .thenReturn(userGenerationParametersString);
  when(encryptor.decrypt(passwordEncryption))
    .thenReturn(USER_PASSWORD);
  userCredentialData = new UserCredentialVersionData();
  userCredentialData.setEncryptedValueData(passwordEncryption);
  userCredentialData.setEncryptedGenerationParameters(parameterEncryption);
  subject = new UserCredentialVersion(userCredentialData);
  subject.setEncryptor(encryptor);
  final StringGenerationParameters generationParameters = subject.getGenerationParameters();
  assertThat(generationParameters, samePropertyValuesAs(stringGenerationParameters));
  verify(encryptor, times(2)).decrypt(any());
}