@Test
public void testGetProperties() throws Exception {

  InstanceConfig instanceConfig = InstanceConfigTest.getInstanceConfigs().get(0);
  ViewEntity viewDefinition = ViewEntityTest.getViewEntity();
  ViewInstanceEntity viewInstanceDefinition = new ViewInstanceEntity(viewDefinition, instanceConfig);
  ViewRegistry viewRegistry = createNiceMock(ViewRegistry.class);
  expect(viewRegistry.getCluster(viewInstanceDefinition)).andReturn(null).anyTimes();
  viewInstanceDefinition.putProperty("p1", "v1");
  viewInstanceDefinition.putProperty("p2", new DefaultMasker().mask("v2"));
  viewInstanceDefinition.putProperty("p3", "v3");
  ViewContextImpl viewContext = new ViewContextImpl(viewInstanceDefinition, viewRegistry);
  Map<String, String> properties = viewContext.getProperties();
  Assert.assertEquals(3, properties.size());
  Assert.assertEquals("v1", properties.get("p1"));
  Assert.assertEquals("v2", properties.get("p2"));
  Assert.assertEquals("v3", properties.get("p3"));
}