@Test
public void testGetLabel() throws Exception {

  // with an instance label
  InstanceConfig instanceConfig = InstanceConfigTest.getInstanceConfigs(xml_with_instance_label).get(0);
  ViewEntity viewDefinition = ViewEntityTest.getViewEntity();
  ViewInstanceEntity viewInstanceDefinition = new ViewInstanceEntity(viewDefinition, instanceConfig);
  Assert.assertEquals("My Instance 1!", viewInstanceDefinition.getLabel());
  // without an instance label
  instanceConfig = InstanceConfigTest.getInstanceConfigs(xml_without_instance_label).get(0);
  viewDefinition = ViewEntityTest.getViewEntity();
  viewInstanceDefinition = new ViewInstanceEntity(viewDefinition, instanceConfig);
  // should default to view label
  Assert.assertEquals("My View!", viewInstanceDefinition.getLabel());
}