@Test
public void testOverridedVisiblePermission1() throws Exception {

    deployContrib(CoreUTConstants.CORE_TESTS_BUNDLE,
            "permissions-override1-contrib.xml");
    PermissionProvider pp = service.getPermissionProvider();
    List<UserVisiblePermission> orderedVisiblePermissions = pp.getUserVisiblePermissionDescriptors();
    assertNotNull(orderedVisiblePermissions);
    assertEquals(Arrays.asList("Read", "CustomCompoundPerm", "ReadWrite",
            "ReadRemove", "Everything"),
            permStrings(orderedVisiblePermissions));
    // Section is overridden
    orderedVisiblePermissions = pp.getUserVisiblePermissionDescriptors("Section");
    assertNotNull(orderedVisiblePermissions);
    assertEquals(Arrays.asList("Read", "CustomCompoundPerm", "ReadWrite",
            "ReadRemove", "Everything"),
            permStrings(orderedVisiblePermissions));
    // Workspace falls back to default thus is overridden too
    orderedVisiblePermissions = pp.getUserVisiblePermissionDescriptors("Workspace");
    assertNotNull(orderedVisiblePermissions);
    assertEquals(Arrays.asList("Read", "CustomCompoundPerm", "ReadWrite",
            "ReadRemove", "Everything"),
            permStrings(orderedVisiblePermissions));
}