Let's using Spock for tests. TaskDispatcherTest was rewritten in groovy using Spock