Add tests for cancellation of processes