add another test case to ConcurrentDispatcherTest
@@ -22,4 +22,15 @@ class ConcurrentDispatcherTest extends Specification {
result.size() == listSize
result == (6 .. 105).toSet()
}
+
+ def "dispatch using empty list"() {
+ def list = []
+ def functionMock = Mock(Function)
+
+ when:
+ Set result = new ConcurrentDispatcher().dispatch(functionMock, list)
+
+ then:
+ result.isEmpty()
+ }
}
