Skip to content

Commit abbf572

Browse files
committed
2465 Fix test
1 parent 4bf0186 commit abbf572

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

server/libs/modules/task-dispatchers/each/src/test/java/com/bytechef/task/dispatcher/each/EachTaskDispatcherTest.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
package com.bytechef.task.dispatcher.each;
2020

21-
import static org.junit.jupiter.api.Assertions.assertThrows;
2221
import static org.mockito.ArgumentMatchers.any;
2322
import static org.mockito.ArgumentMatchers.anyLong;
2423
import static org.mockito.Mockito.mock;
@@ -77,16 +76,17 @@ public class EachTaskDispatcherTest {
7776

7877
@Test
7978
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);
8482

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")))
8787
.build());
88-
verify(eventPublisher, times(1)).publishEvent(any(TaskExecutionErrorEvent.class));
89-
});
88+
89+
verify(eventPublisher, times(1)).publishEvent(any(TaskExecutionErrorEvent.class));
9090
}
9191

9292
@Test

0 commit comments

Comments
 (0)