use of org.motechproject.tasks.domain.mds.task.Task in project motech by motech.
the class TaskContextTest method testGetTriggerKeyShouldThrowException.
@Test(expected = IllegalStateException.class)
public void testGetTriggerKeyShouldThrowException() throws Exception {
MotechEvent event = mock(MotechEvent.class);
when(event.getParameters()).thenReturn(new HashMap<>());
KeyInformation key = parse(String.format("%s.%s", TRIGGER_PREFIX, EVENT_KEY));
Task task = new TaskBuilder().addAction(new TaskActionInformation()).build();
new TaskContext(task, event.getParameters(), null, activityService).getTriggerValue(key.getKey());
}
Aggregations