SensitiveDataObfuscator { public static List<String> getSensitiveDataFromFile() { URL url = SensitiveDataObfuscator.class.getResource(CollectionConstants.SENSITIVE_DATA_FILE); String sensitiveData = CommonUtil.readJsonFile(url); Gson gson = new Gson(); return gson.fromJson(sensitiveData, List.class); }  static List<String> getSensitiveDataFromFile(); static String hashSensitiveDataHierarchically(String key, String value, List<String> expandedSensitiveData); static String hashSensitiveData(String key, String value, List<String> expandedSensitiveData); static String parseStrToSHA256(String str);  }
@Test(groups = { "SensitiveDataObfuscatorTest" }) public void testGetSensitiveDataFromFile() { List<String> sensitiveDataContent = SensitiveDataObfuscator.getSensitiveDataFromFile(); assertTrue(sensitiveDataContent != null && sensitiveDataContent.size() > 0); assertTrue(sensitiveDataContent.contains("ip")); assertTrue(sensitiveDataContent.contains("dns1")); assertTrue(sensitiveDataContent.contains("dns2")); assertTrue(sensitiveDataContent.contains("gateway")); assertTrue(sensitiveDataContent.contains("username")); assertTrue(sensitiveDataContent.contains("password")); assertTrue(sensitiveDataContent.contains("sslCertificate")); }