### Question:
EventImpl implements Event { public ViewInstanceDefinition getViewInstanceSubject() { return viewInstanceSubject; } EventImpl(String id, Map<String, String> properties, ViewDefinition viewSubject);  EventImpl(String id, Map<String, String> properties, ViewInstanceDefinition viewInstanceSubject); private  EventImpl(String id, Map<String, String> properties,
                ViewDefinition viewSubject, ViewInstanceDefinition viewInstanceSubject); String getId(); Map<String, String> getProperties(); ViewDefinition getViewSubject(); ViewInstanceDefinition getViewInstanceSubject(); @Override String toString();  }### Answer:
@Test public void testGetViewInstanceSubject() throws Exception { EventImpl event = getEvent("MyEvent", Collections.emptyMap(), view_xml); Assert.assertNull(event.getViewInstanceSubject()); ViewInstanceEntity viewInstanceEntity = ViewInstanceEntityTest.getViewInstanceEntity(); event = getEvent("MyEvent", Collections.emptyMap(), viewInstanceEntity); Assert.assertEquals(viewInstanceEntity, event.getViewInstanceSubject()); }