### Question:
PermissionResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { Set<SubResourceDefinition> subResourceDefinitions = new HashSet<>(); subResourceDefinitions.add(new SubResourceDefinition(Resource.Type.RoleAuthorization)); return subResourceDefinitions; } PermissionResourceDefinition(); @Override String getPluralName(); @Override String getSingularName(); @Override Set<SubResourceDefinition> getSubResourceDefinitions();  }### Answer:
@Test public void testGetSubResourceDefinitions() throws Exception { PermissionResourceDefinition permissionResourceDefinition = new PermissionResourceDefinition(); Set<SubResourceDefinition> subResourceDefinitions = permissionResourceDefinition.getSubResourceDefinitions (); Set<Resource.Type> expectedSubTypes = new HashSet<>(); expectedSubTypes.add(Resource.Type.RoleAuthorization); Assert.assertEquals(1, subResourceDefinitions.size()); for(SubResourceDefinition subResourceDefinition:subResourceDefinitions) { Assert.assertTrue(expectedSubTypes.contains(subResourceDefinition.getType())); } }