ViewResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { return Collections.singleton(new SubResourceDefinition(Resource.Type.ViewVersion)); } ViewResourceDefinition(); @Override String getPluralName(); @Override String getSingularName(); @Override Set<SubResourceDefinition> getSubResourceDefinitions();  }
@Test public void testGetSubResourceDefinitions() throws Exception { ViewResourceDefinition viewResourceDefinition = new ViewResourceDefinition(); Set<SubResourceDefinition> subResourceDefinitions = viewResourceDefinition.getSubResourceDefinitions (); Assert.assertEquals(1, subResourceDefinitions.size()); Assert.assertEquals("ViewVersion", subResourceDefinitions.iterator().next().getType().name()); }