test-cases compile and don't segfault

I had to remove some code from the sampleutil code for it to compile
that is not cool. We should include some daily testruns in jenkins with
automatic notification if any of them fail.

Also note that some of the EngineMasterTests fail. I'm not sure if this is an regression or due to outdated tests