@Test
public void testSinkParam() {

    String sink = "sqs:queue_name";
    WorkflowDef def = new WorkflowDef();
    def.setName("wf0");
    Workflow workflow = new Workflow();
    workflow.setWorkflowDefinition(def);
    Task task1 = new Task();
    task1.setReferenceTaskName("t1");
    task1.getOutputData().put("q", "t1_queue");
    workflow.getTasks().add(task1);
    Task task2 = new Task();
    task2.setReferenceTaskName("t2");
    task2.getOutputData().put("q", "task2_queue");
    workflow.getTasks().add(task2);
    Task task = new Task();
    task.setReferenceTaskName("event");
    task.getInputData().put("sink", sink);
    task.setTaskType(TaskType.EVENT.name());
    workflow.getTasks().add(task);
    Event event = new Event(eventQueues, parametersUtils, objectMapper);
    ObservableQueue queue = event.getQueue(workflow, task);
    assertNotNull(task.getReasonForIncompletion(), queue);
    assertEquals("queue_name", queue.getName());
    assertEquals("sqs", queue.getType());
    sink = "sqs:${t1.output.q}";
    task.getInputData().put("sink", sink);
    queue = event.getQueue(workflow, task);
    assertNotNull(queue);
    assertEquals("t1_queue", queue.getName());
    assertEquals("sqs", queue.getType());
    System.out.println(task.getOutputData().get("event_produced"));
    sink = "sqs:${t2.output.q}";
    task.getInputData().put("sink", sink);
    queue = event.getQueue(workflow, task);
    assertNotNull(queue);
    assertEquals("task2_queue", queue.getName());
    assertEquals("sqs", queue.getType());
    System.out.println(task.getOutputData().get("event_produced"));
    sink = "conductor";
    task.getInputData().put("sink", sink);
    queue = event.getQueue(workflow, task);
    assertNotNull(queue);
    assertEquals(workflow.getWorkflowName() + ":" + task.getReferenceTaskName(), queue.getName());
    assertEquals("conductor", queue.getType());
    System.out.println(task.getOutputData().get("event_produced"));
    sink = "sqs:static_value";
    task.getInputData().put("sink", sink);
    queue = event.getQueue(workflow, task);
    assertNotNull(queue);
    assertEquals("static_value", queue.getName());
    assertEquals("sqs", queue.getType());
    assertEquals(sink, task.getOutputData().get("event_produced"));
    System.out.println(task.getOutputData().get("event_produced"));
    sink = "bad:queue";
    task.getInputData().put("sink", sink);
    queue = event.getQueue(workflow, task);
    assertNull(queue);
    assertEquals(Task.Status.FAILED, task.getStatus());
}