@Test
public void testGetInstanceName() throws Exception {

  InstanceConfig instanceConfig = InstanceConfigTest.getInstanceConfigs().get(0);
  ViewEntity viewDefinition = ViewEntityTest.getViewEntity();
  ViewInstanceEntity viewInstanceDefinition = new ViewInstanceEntity(viewDefinition, instanceConfig);
  ViewRegistry viewRegistry = createNiceMock(ViewRegistry.class);
  ViewContextImpl viewContext = new ViewContextImpl(viewInstanceDefinition, viewRegistry);
  Assert.assertEquals("INSTANCE1", viewContext.getInstanceName());
}