@Test
public void testFailTaskWithInputPayload() {

    Task task = new Task();
    task.setInputData(new HashMap<>());
    expectedException.expect(TerminateWorkflowException.class);
    externalPayloadStorageUtils.failTask(task, ExternalPayloadStorage.PayloadType.TASK_INPUT, "error");
    assertNotNull(task);
    assertNull(task.getInputData());
}