rombert commented on a change in pull request #24:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/24#discussion_r520424294



##########
File path: 
src/test/java/org/apache/sling/resourceresolver/impl/mapping/MapEntriesTest.java
##########
@@ -2074,4 +2102,28 @@ public void run() {
             }
         }
     }
+
+    @Test
+    public void testIsValidAliasPath() throws Exception {
+        Method method = MapEntries.class.getDeclaredMethod("isValidAliasPath", 
String.class);
+        method.setAccessible(true);
+
+        // ignore system tree - path should not start with /jcr:system -
+        assertFalse((Boolean)method.invoke(mapEntries, "/jcr:system/node"));
+        //valid alias path
+        assertTrue((Boolean)method.invoke(mapEntries, "/parent"));
+        // notallowedparent is not valid configured alias path
+        assertFalse((Boolean)method.invoke(mapEntries, "/notallowedparent"));
+    }
+
+    @Test
+    public void testNullAliasPath() throws NoSuchMethodException, 
IllegalAccessException {

Review comment:
       See my above comment - I suggested _not_ making this method private to 
ease testing.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to