public void GivenDeletingStudentGrade_WhenDeleting_ThenCorrespondingStudentGradeIsDeleted()
        {
            // Arrange

            var testStudent = new Student("OliCreationTest", "test")
            {
                Id     = 1,
                Grades = new List <Grade>
                {
                    new Grade {
                        Subject = "Maths"
                    }
                }
            };
            DeleteStudentGradeMessage      request = null;
            DeleteStudentGradeReplyMessage reply   = null;

            var queryCountWrapper = new Mock <IQueryCountWrapper>();

            queryCountWrapper.SetupGet(qcw => qcw.QueryCount).Returns(0);

            var bus = new Mock <IBus>(MockBehavior.Strict);

            bus
            .Setup(b => b.SendRequest
                   <DeleteStudentGradeMessage, DeleteStudentGradeReplyMessage>
                       (It.IsAny <string>(), It.IsAny <DeleteStudentGradeMessage>(), null, It.IsAny <int>()))
            .Returns <string, DeleteStudentGradeMessage, Dictionary <string, string>, int>(
                (endpoint, message, headers, timeout) =>
            {
                request = message;
                reply   = new DeleteStudentGradeReplyMessage(message.CorrelationId);
                return(reply);
            });

            var claimsHelper = new Mock <IClaimsHelper>(MockBehavior.Strict);
            var controller   = new StudentController(bus.Object, claimsHelper.Object, queryCountWrapper.Object);

            // Act
            var result         = controller.DeleteStudentGrade((int)testStudent.Id, "Maths");
            var okObjectResult = result as ObjectResult;

            // Assert

            Assert.Equal(reply.CorrelationId, okObjectResult.Value);
        }