|
18 | 18 |
|
19 | 19 | package com.bytechef.task.dispatcher.each; |
20 | 20 |
|
21 | | -import static org.junit.jupiter.api.Assertions.assertThrows; |
22 | 21 | import static org.mockito.ArgumentMatchers.any; |
23 | 22 | import static org.mockito.ArgumentMatchers.anyLong; |
24 | 23 | import static org.mockito.Mockito.mock; |
@@ -77,16 +76,17 @@ public class EachTaskDispatcherTest { |
77 | 76 |
|
78 | 77 | @Test |
79 | 78 | public void testEachTaskDispatcherWhenMissingRequiredParameter() { |
80 | | - assertThrows(NullPointerException.class, () -> { |
81 | | - EachTaskDispatcher dispatcher = new EachTaskDispatcher( |
82 | | - contextService, counterService, EVALUATOR, eventPublisher, taskDispatcher, |
83 | | - taskExecutionService, taskFileStorage); |
| 79 | + EachTaskDispatcher dispatcher = new EachTaskDispatcher( |
| 80 | + contextService, counterService, EVALUATOR, eventPublisher, taskDispatcher, taskExecutionService, |
| 81 | + taskFileStorage); |
84 | 82 |
|
85 | | - dispatcher.dispatch(TaskExecution.builder() |
86 | | - .workflowTask(new WorkflowTask(Map.of(WorkflowConstants.NAME, "name", WorkflowConstants.TYPE, "type"))) |
| 83 | + dispatcher.dispatch( |
| 84 | + TaskExecution.builder() |
| 85 | + .workflowTask( |
| 86 | + new WorkflowTask(Map.of(WorkflowConstants.NAME, "name", WorkflowConstants.TYPE, "type"))) |
87 | 87 | .build()); |
88 | | - verify(eventPublisher, times(1)).publishEvent(any(TaskExecutionErrorEvent.class)); |
89 | | - }); |
| 88 | + |
| 89 | + verify(eventPublisher, times(1)).publishEvent(any(TaskExecutionErrorEvent.class)); |
90 | 90 | } |
91 | 91 |
|
92 | 92 | @Test |
|
0 commit comments