@Test
public void testGetSubResourceDefinitions() throws Exception {

  ViewVersionResourceDefinition viewVersionResourceDefinition = new ViewVersionResourceDefinition();
  Set<SubResourceDefinition> subResourceDefinitions = viewVersionResourceDefinition.getSubResourceDefinitions ();
  Assert.assertEquals(2, subResourceDefinitions.size());
  for (SubResourceDefinition subResourceDefinition : subResourceDefinitions) {
    String name = subResourceDefinition.getType().name();
    Assert.assertTrue(name.equals("ViewInstance") || name.equals("ViewPermission"));
  }
}