@Test
public void testGetSubResourceDefinitions() {

  ResourceDefinition def = new StackServiceResourceDefinition();
  Set<SubResourceDefinition> subResources = def.getSubResourceDefinitions();
  assertEquals(5, subResources.size());
  boolean configReturned = false;
  boolean componentReturned = false;
  boolean artifactReturned = false;
  boolean themesReturned = false;
  for (SubResourceDefinition subResource : subResources) {
    Resource.Type type = subResource.getType();
    if (type.equals(Resource.Type.StackConfiguration)) {
      configReturned = true;
    } else if (type.equals(Resource.Type.StackServiceComponent)) {
      componentReturned = true;
    } else if (type.equals(Resource.Type.StackArtifact)) {
      artifactReturned = true;
    } else if (type.equals(Resource.Type.Theme)) {
      themesReturned = true;
    }
  }
  assertTrue(configReturned);
  assertTrue(componentReturned);
  assertTrue(artifactReturned);
  assertTrue(themesReturned);
}