async def METHOD_NAME(event_loop, context, caplog, mocker):
    srv, ctx = context
    mocker.patch.object(
        ctx.protocol_class,
        "read_message",
        mock.AsyncMock(
            side_effect=RuntimeError("test")
        )
    )
    with caplog.at_level("TRACE"):
        _, writer = await asyncio.open_connection(*srv.sockets[0].getsockname())
    with closing(writer):
        assert "Exception in protocol" in caplog.text