def test_stop_then_send_expects_result_response(self, client_constructor):
        """New requests should work after stopping the manager."""
        expected_result = quantum.QuantumResult(parent='projects/proj/programs/prog/jobs/job0')
        fake_client, manager = setup(client_constructor)

        async def test():
            async with duet.timeout_scope(5):
                manager.stop()
                actual_result_future = manager.submit(
                    REQUEST_PROJECT_NAME, REQUEST_PROGRAM, REQUEST_JOB0
                )
                await fake_client.wait_for_requests()
                await fake_client.reply(quantum.QuantumRunStreamResponse(result=expected_result))
                actual_result = await actual_result_future
                manager.stop()

                assert actual_result == expected_result
                assert len(fake_client.all_stream_requests) == 1
                # assert that the first request is a CreateQuantumProgramAndJobRequest.
                assert 'create_quantum_program_and_job' in fake_client.all_stream_requests[0]

        duet.run(test)
New requests should work after stopping the manager.
cirq-google/cirq_google/engine/stream_manager_test.py