bhaveshamre commented on code in PR #644:
URL: https://github.com/apache/ranger/pull/644#discussion_r2313128561


##########
security-admin/src/test/java/org/apache/ranger/common/TestPropertiesUtil.java:
##########
@@ -121,8 +117,42 @@ public void testGetPropertyStringList() {
         PropertiesUtil.getPropertiesMap().put("ranger.users.roles.list", 
"read,write,access");
         String[] actualRoles = PropertiesUtil.getPropertyStringList(key);
 
-        Assert.assertEquals("read", actualRoles[0]);
-        Assert.assertEquals("write", actualRoles[1]);
-        Assert.assertEquals("access", actualRoles[2]);
+        Assertions.assertEquals("read", actualRoles[0]);
+        Assertions.assertEquals("write", actualRoles[1]);
+        Assertions.assertEquals("access", actualRoles[2]);
+    }
+
+    @Test
+    public void testGetPropsContainsInsertedEntries() {
+        PropertiesUtil.getPropertiesMap().put("prop.alpha", "A");
+        PropertiesUtil.getPropertiesMap().put("prop.beta", "B");
+        java.util.Properties props = PropertiesUtil.getProps();
+        Assertions.assertEquals("A", props.getProperty("prop.alpha"));
+        Assertions.assertEquals("B", props.getProperty("prop.beta"));
+    }
+
+    @Test
+    public void testGetConfigMapWithPrefix() {
+        PropertiesUtil.getPropertiesMap().put("abc.key1", "v1");
+        PropertiesUtil.getPropertiesMap().put("abc.key2", "v2");
+        PropertiesUtil.getPropertiesMap().put("xyz.key3", "v3");
+        java.util.Map<String, String> res = 
PropertiesUtil.getConfigMapWithPrefix("abc.");

Review Comment:
   Made necessary changes as per the comment.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@ranger.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to