@Test
    void testToString() {
        WildcardPermission p1 = new WildcardPermission("*");
        WildcardPermission p2 = new WildcardPermission("one");
        WildcardPermission p3 = new WildcardPermission("one:two");
        WildcardPermission p4 = new WildcardPermission("one,two:three,four");
        WildcardPermission p5 = new WildcardPermission("one,two:three,four,five:six:seven,eight");

        assertEquals("*", p1.toString());
        assertEquals(p1, new WildcardPermission(p1.toString()));
        assertEquals("one", p2.toString());
        assertEquals(p2, new WildcardPermission(p2.toString()));
        assertEquals("one:two", p3.toString());
        assertEquals(p3, new WildcardPermission(p3.toString()));
        assertEquals("one,two:three,four", p4.toString());
        assertEquals(p4, new WildcardPermission(p4.toString()));
        assertEquals("one,two:three,four,five:six:seven,eight", p5.toString());
        assertEquals(p5, new WildcardPermission(p5.toString()));
    }
Validates WildcardPermissions with that contain the same list parts are equal.
core/src/test/java/org/apache/shiro/authz/permission/WildcardPermissionTest.java