@Test
public void testUploadEvent() throws Exception {

  final URL resource = requireNonNull(getClass().getClassLoader().getResource("sample_flow_01.zip"));
  final File projectZipFile = new File(resource.getPath());
  final User uploader = new User("testUser1");
  this.project.setVersion(this.VERSION);
  // Add a customized event listener
  project.addListener((event) -> {
    ProjectEvent projectEvent = (ProjectEvent) event;
    // Check upload event data metadata
    Assert.assertEquals("Event metadata not created as expected.", "testUser1", projectEvent.getEventData().get("modifiedBy"));
    Assert.assertEquals("Event metadata not created as expected.", IPv4, projectEvent.getEventData().get("uploaderIPAddress"));
    Assert.assertTrue("Event metadata not created as expected.", (long)projectEvent.getEventData().get("projectUploadTime") >= 0);
    Assert.assertTrue("Event metadata not created as expected.", (long)projectEvent.getEventData().get("projectZipSize") >= 0);
    Assert.assertEquals("Event metadata not created as expected.", "FAT_ZIP", projectEvent.getEventData().get("zipType"));
    Assert.assertEquals("Event metadata not created as expected.", "ERROR", projectEvent.getEventData().get("projectEventStatus"));
    Assert.assertEquals("Event metadata not created as expected.", "java.lang.NullPointerException", projectEvent.getEventData().get("errorMessage"));
  });
  assertThatThrownBy(
          () -> this.azkabanProjectLoader.uploadProject(this.project, projectZipFile, "zip", uploader, this.props, IPv4))
          .isInstanceOf(NullPointerException.class);
}