PrivilegeResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { return Collections.emptySet(); } PrivilegeResourceDefinition(Resource.Type type); @Override String getPluralName(); @Override String getSingularName(); @Override Set<SubResourceDefinition> getSubResourceDefinitions();  }
@Test public void testGetSubResourceDefinitions() throws Exception { PrivilegeResourceDefinition privilegeResourceDefinition = new PrivilegeResourceDefinition(Resource.Type.AmbariPrivilege); Set<SubResourceDefinition> subResourceDefinitions = privilegeResourceDefinition.getSubResourceDefinitions (); Assert.assertEquals(0, subResourceDefinitions.size()); }