@Test
public void testUpdateCreator() throws Exception {

  MediaPackage mediaPackage = new MediaPackageBuilderImpl()
          .loadFromXml(getClass().getResourceAsStream("/jobs_mediapackage1.xml"));
  TakeSnapshot takeSnapshot = AssetManagerItem.add(workspace, mediaPackage, new AccessControlList(), 0, new Date());
  // Test initial set of creator
  assetManager.execute(takeSnapshot);
  Event event = index.getEventResult();
  assertNotNull(event);
  assertEquals("Current user is expected to be creator as no other creator has been set explicitly", "Creator",
          event.getCreator());
  // Test updating creator
  event.setCreator("Hans");
  index.setInitialEvent(event);
  assetManager.execute(takeSnapshot);
  event = index.getEventResult();
  assertNotNull(event);
  assertEquals("Creator has been updated", "Hans", event.getCreator());
}