Assert.assertEquals(viewInstanceDefinition, viewInstanceDefinitions.iterator().next());
}
@Test
public void testGetSubResourceDefinitions() throws Exception {
ViewEntity viewDefinition = ViewEntityTest.getViewEntity();
ViewRegistry registry = ViewRegistry.getInstance();
ResourceConfig config = ResourceConfigTest.getResourceConfigs().get(0);
Resource.Type type1 = new Resource.Type("myType");
ResourceProvider provider1 = createNiceMock(ResourceProvider.class);
viewDefinition.addResourceProvider(type1, provider1);
viewDefinition.addResourceConfiguration(type1, config);
registry.addDefinition(viewDefinition);
Set<SubResourceDefinition> subResourceDefinitions = registry.getSubResourceDefinitions("MY_VIEW");
Assert.assertEquals(1, subResourceDefinitions.size());
Assert.assertEquals("myType", subResourceDefinitions.iterator().next().getType().name());