Add tests for EAGAIN in transport.write