@Test
public void testDeleteEvent() throws Exception {

  final long oneHourMillis = 3600_000;
  final String mpId = "mpId";
  final String agentId = "agent1";
  final String orgId = new DefaultOrganization().getId();
  final Date start = new Date();
  final Date end = new Date(start.getTime() + 2 * oneHourMillis);
  schedulerDatabase.storeEvent(
      mpId,
      orgId,
      Opt.some(agentId),
      Opt.some(start),
      Opt.some(end),
      Opt.none(),
      Opt.none(),
      Opt.none(),
      Opt.none(),
      Opt.none(),
      Opt.none(),
      Opt.none(),
      Opt.none()
  );
  final Opt<ExtendedEventDto> initialEvent = schedulerDatabase.getEvent(mpId);
  Assert.assertTrue(initialEvent.isSome());
  schedulerDatabase.deleteEvent(mpId);
  final Opt<ExtendedEventDto> newEvent = schedulerDatabase.getEvent(mpId);
  Assert.assertFalse(newEvent.isSome());
}