Add tests for receiveTask