@Test
public void decryptAndSave() throws Exception {

    // given
    String propertyKey = "admin.password";
    String propertyEncodedValue = "JP6lC6hVeu3wRZA1Tzigyg==";
    String propertyValue = "5ecr3t";
    Path tempFile = Files.createTempFile("dataprep-PropertiesEncryptionTest.", ".properties");
    try (BufferedWriter bufferedWriter = Files.newBufferedWriter(tempFile, Charsets.UTF_8)) {
        for (int i = 0; i < 5; i++) {
            bufferedWriter.write(propertyKey + "=" + propertyEncodedValue);
            bufferedWriter.newLine();
        }
    }
    // when
    new PropertiesEncryption().decryptAndSave(tempFile.toString(), Sets.newHashSet(propertyKey));
    // then
    final String expectedLine = propertyKey + "=" + propertyValue;
    verifyContent(expectedLine, tempFile);
}