public async Task Should_Be_Able_To_Return_Reject() { using (var requester = ZyRabbitFactory.CreateTestClient()) using (var responder = ZyRabbitFactory.CreateTestClient()) { /* Setup */ var firstTsc = new TaskCompletionSource <BasicRequest>(); var secondTsc = new TaskCompletionSource <BasicRequest>(); var sent = new BasicResponse { Prop = "I'm from the second handler" }; await responder.RespondAsync <BasicRequest, BasicResponse>(async request => { firstTsc.TrySetResult(request); return(Respond.Reject <BasicResponse>()); } ); await responder.RespondAsync <BasicRequest, BasicResponse>(async request => { secondTsc.TrySetResult(request); return(Respond.Ack(sent)); } ); /* Test */ var received = await requester.RequestAsync <BasicRequest, BasicResponse>(new BasicRequest()); await firstTsc.Task; await secondTsc.Task; /* Assert */ Assert.Equal(received.Prop, sent.Prop); } }