### Question:
ViewSubResourceDefinition extends BaseResourceDefinition { @Override public synchronized Set<SubResourceDefinition> getSubResourceDefinitions() { if (definitions == null) { definitions = new HashSet<>(); List<String> subResourceNames = resourceConfiguration.getSubResourceNames(); if (subResourceNames != null) { for (String subType : subResourceNames) { Resource.Type type = Resource.Type.valueOf( viewDefinition.getQualifiedResourceTypeName(subType)); definitions.add(new SubResourceDefinition(type)); } } } return definitions; } ViewSubResourceDefinition(ViewEntity viewDefinition, ResourceConfig resourceConfiguration); @Override String getPluralName(); @Override String getSingularName(); @Override synchronized Set<SubResourceDefinition> getSubResourceDefinitions(); ResourceConfig getResourceConfiguration();  }### Answer:
@Test public void testGetSubResourceDefinitions() throws Exception { ViewSubResourceDefinition viewSubResourceDefinition = getViewSubResourceDefinition(); new Resource.Type("MY_VIEW{1.0.0}/resource"); new Resource.Type("MY_VIEW{1.0.0}/subresource"); Set<SubResourceDefinition> subResourceDefinitions = viewSubResourceDefinition.getSubResourceDefinitions (); Assert.assertEquals(1, subResourceDefinitions.size()); Assert.assertEquals("MY_VIEW{1.0.0}/subresource", subResourceDefinitions.iterator().next().getType().name()); }