@Override
    public String restricted(String url) {
        // check excluded first
        if (excludedUrl(url)) {
            return null;
        }

        // is the url restricted?
        String constraint = includedUrl(url);
        if (constraint == null) {
            return null;
        }

        // is there any roles for the restricted url?
        String roles = inclusions != null ? inclusions.get(constraint) : null;
        if (roles == null) {
            // use wildcard to indicate any role is accepted
            return "*";
        } else {
            return roles;
        }
    }
@Test
    public void testDefault() {
        SecurityConstraintMapping matcher = new SecurityConstraintMapping();

        assertNotNull(matcher.restricted("/"));
        assertNotNull(matcher.restricted("/foo"));
    }