Fixes build instability

Create test helper functions to make the tests more readable.
Removes child tasks and makes all protocol tests synchronous.