### Question:
ComponentStackVersionResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { final Set<SubResourceDefinition> subResourceDefintions = new HashSet<>(); subResourceDefintions.add(new SubResourceDefinition(Resource.Type.RepositoryVersion)); return subResourceDefintions; } ComponentStackVersionResourceDefinition(Resource.Type type); @Override String getPluralName(); @Override String getSingularName(); @Override Set<SubResourceDefinition> getSubResourceDefinitions();  }### Answer:
@Test public void testGetSubResourceDefinitions() throws Exception { final ComponentStackVersionResourceDefinition resourceDefinition = new ComponentStackVersionResourceDefinition(null); final Set<SubResourceDefinition> subResourceDefinitions = resourceDefinition.getSubResourceDefinitions (); Assert.assertEquals(1, subResourceDefinitions.size()); }