Fixed a small bug so that testing becomes possible. 

getWorkerThread should return an Array of WorkerThreads but the cast for
from Object[] to WorkerThread[] doesn't work (anymore). Specifying that
toArray function from List should expected an array of WorkerThreads
fixes this.