properties.put("p1", "v1");
Configuration ambariConfig = new Configuration(properties);
ViewConfig config = ViewConfigTest.getConfig(xml_valid_instance);
ViewEntity viewEntity = getViewEntity(config, ambariConfig, getClass().getClassLoader(), "");
ViewInstanceEntity viewInstanceEntity = getViewInstanceEntity(viewEntity, config.getInstances().get(0));
<BUG>viewInstanceDAO.create(viewInstanceEntity);
replay(viewDAO, viewInstanceDAO);</BUG>
registry.addDefinition(viewEntity);
registry.installViewInstance(viewInstanceEntity);
Collection<ViewInstanceEntity> viewInstanceDefinitions = registry.getInstanceDefinitions(viewEntity);

properties.put("p1", "v1");
Configuration ambariConfig = new Configuration(properties);
ViewConfig config = ViewConfigTest.getConfig(xml_valid_instance);
ViewEntity viewEntity = getViewEntity(config, ambariConfig, getClass().getClassLoader(), "");
ViewInstanceEntity viewInstanceEntity = getViewInstanceEntity(viewEntity, config.getInstances().get(0));
expect(viewInstanceDAO.merge(viewInstanceEntity)).andReturn(null);
replay(viewDAO, viewInstanceDAO);
registry.addDefinition(viewEntity);
registry.installViewInstance(viewInstanceEntity);
Collection<ViewInstanceEntity> viewInstanceDefinitions = registry.getInstanceDefinitions(viewEntity);
