Montecarlo and forgotten test code

A couple of commits in this pull, one about the monte carlo use case, the other about some testing code for the task worker it was forgotten with the move of the repository