test_class.file: dataprep-backend-service/src/test/java/org/talend/dataprep/encrypt/PropertiesEncryptionTest.java
test_class.identifier: PropertiesEncryptionTest
test_case.body: @Test
      public void encryptAndSave_doesNotBreakLayout() throws Exception {
          Path tempFile = Files.createTempFile("dataprep-PropertiesEncryptionTest.", ".properties");
          try (InputStream refInStream = getClass().getResourceAsStream("keep-layout-test-in.properties")) {
              Files.copy(refInStream, tempFile, StandardCopyOption.REPLACE_EXISTING);
          }
  
          new PropertiesEncryption().encryptAndSave(tempFile.toString(), Sets.newHashSet("admin.password"));
  
          assertEquals(Resources.toString(getClass().getResource("keep-layout-test-expected.properties"), Charsets.UTF_8),
                  com.google.common.io.Files.toString(tempFile.toFile(), Charsets.UTF_8));
  
      }
test_case.class_method_signature: PropertiesEncryptionTest.encryptAndSave_doesNotBreakLayout()
test_case.full_signature: @Test public void encryptAndSave_doesNotBreakLayout()
test_case.identifier: encryptAndSave_doesNotBreakLayout
test_case.invocations: createTempFile getResourceAsStream getClass copy encryptAndSave toString newHashSet assertEquals toString getResource getClass toString toFile
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void encryptAndSave_doesNotBreakLayout()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(PropertiesEncryption.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(PropertiesEncryption.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.file: dataprep-backend-service/src/main/java/org/talend/dataprep/encrypt/PropertiesEncryption.java
focal_class.identifier: PropertiesEncryption
focal_class.class_method_signature: PropertiesEncryption.encryptAndSave(String input, Set<String> mustBeEncrypted)
focal_class.full_signature: public void encryptAndSave(String input, Set<String> mustBeEncrypted)
focal_class.identifier: encryptAndSave
focal_class.modifiers: public
focal_class.parameters: (String input, Set<String> mustBeEncrypted)
focal_class.return: void
focal_class.signature: void encryptAndSave(String input, Set<String> mustBeEncrypted)
focal_class.class_method_signature: PropertiesEncryption.decryptAndSave(String input, Set<String> mustBeDecrypted)
focal_class.full_signature: public void decryptAndSave(String input, Set<String> mustBeDecrypted)
focal_class.identifier: decryptAndSave
focal_class.modifiers: public
focal_class.parameters: (String input, Set<String> mustBeDecrypted)
focal_class.return: void
focal_class.signature: void decryptAndSave(String input, Set<String> mustBeDecrypted)
focal_class.class_method_signature: PropertiesEncryption.modifyAndSave(String input, Set<String> mustBeModified, Function<String, String> function)
focal_class.full_signature: private void modifyAndSave(String input, Set<String> mustBeModified, Function<String, String> function)
focal_class.identifier: modifyAndSave
focal_class.modifiers: private
focal_class.parameters: (String input, Set<String> mustBeModified, Function<String, String> function)
focal_class.return: void
focal_class.signature: void modifyAndSave(String input, Set<String> mustBeModified, Function<String, String> function)
focal_class.class_method_signature: PropertiesEncryption.encryptIfNot(String input)
focal_class.full_signature: private String encryptIfNot(String input)
focal_class.identifier: encryptIfNot
focal_class.modifiers: private
focal_class.parameters: (String input)
focal_class.return: String
focal_class.signature: String encryptIfNot(String input)
focal_class.class_method_signature: PropertiesEncryption.decryptIfNot(String input)
focal_class.full_signature: private String decryptIfNot(String input)
focal_class.identifier: decryptIfNot
focal_class.modifiers: private
focal_class.parameters: (String input)
focal_class.return: String
focal_class.signature: String decryptIfNot(String input)
focal_class.class_method_signature: PropertiesEncryption.isUrl(String field)
focal_class.full_signature: private static boolean isUrl(String field)
focal_class.identifier: isUrl
focal_class.modifiers: private static
focal_class.parameters: (String field)
focal_class.return: boolean
focal_class.signature: boolean isUrl(String field)
focal_method.body: public void encryptAndSave(String input, Set<String> mustBeEncrypted) {
          modifyAndSave(input, mustBeEncrypted, this::encryptIfNot);
      }
focal_method.class_method_signature: PropertiesEncryption.encryptAndSave(String input, Set<String> mustBeEncrypted)
focal_method.full_signature: public void encryptAndSave(String input, Set<String> mustBeEncrypted)
focal_method.identifier: encryptAndSave
focal_method.invocations: modifyAndSave
focal_method.modifiers: public
focal_method.parameters: (String input, Set<String> mustBeEncrypted)
focal_method.return: void
focal_method.signature: void encryptAndSave(String input, Set<String> mustBeEncrypted)