public async Task QuantaBatchTest(KeyPair alphaKeyPair, ConnectionState state, Type excpectedException)
        {
            Global.AppState.State = ApplicationState.Ready;

            var clientConnection = new AuditorWebSocketConnection(new FakeWebSocket(), null)
            {
                ConnectionState = state
            };
            var orderEnvelope = new QuantaBatch
            {
                Quanta = new List <MessageEnvelope>()
            }.CreateEnvelope();

            orderEnvelope.Sign(alphaKeyPair);

            await AssertMessageHandling(clientConnection, orderEnvelope, excpectedException);
        }
        public async Task QuantaBatchTest(KeyPair alphaKeyPair, ConnectionState state, Type excpectedException)
        {
            context.AppState.State = ApplicationState.Ready;

            var clientConnection = new AuditorWebSocketConnection(context, new FakeAuditorConnectionInfo(new FakeWebSocket()))
            {
                ConnectionState = state
            };
            var orderEnvelope = new QuantaBatch
            {
                Quanta = new List <MessageEnvelope>()
            }.CreateEnvelope();

            orderEnvelope.Sign(alphaKeyPair);
            using var writer = new XdrBufferWriter();
            var inMessage = orderEnvelope.ToIncomingMessage(writer);

            await AssertMessageHandling(clientConnection, inMessage, excpectedException);
        }