@Test
public void testGetSubResourceDefinitions() throws Exception {

  PermissionResourceDefinition permissionResourceDefinition = new PermissionResourceDefinition();
  Set<SubResourceDefinition> subResourceDefinitions = permissionResourceDefinition.getSubResourceDefinitions ();
  Set<Resource.Type> expectedSubTypes = new HashSet<Resource.Type>();
  expectedSubTypes.add(Resource.Type.RoleAuthorization);
  Assert.assertEquals(1, subResourceDefinitions.size());
  for(SubResourceDefinition subResourceDefinition:subResourceDefinitions) {
    Assert.assertTrue(expectedSubTypes.contains(subResourceDefinition.getType()));
  }
}