@SuppressWarnings("unchecked")
  public DATA_TYPE getData() {
    Object data = this.execution.taskInstance.getData();
    if (data == null) {
      return null;
    } else if (dataClass.isInstance(data)) {
      return (DATA_TYPE) data;
    }
    throw new DataClassMismatchException(dataClass, data.getClass());
  }
@Test
  public void test_data_class_type_equals() {
    Instant now = Instant.now();
    OneTimeTask<Integer> task =
        TestTasks.oneTime("OneTime", Integer.class, (instance, executionContext) -> {});
    Execution execution = new Execution(now, task.instance("id1", new Integer(1)));

    ScheduledExecution<Integer> scheduledExecution =
        new ScheduledExecution<>(Integer.class, execution);
    assertEquals(new Integer(1), scheduledExecution.getData());
  }