public void TestSetRight()
        {
            StoreMock.Setup(store => store.SetRight(1, "xyz")).Returns(DiffStub);
            var postData = new DiffController.DiffData {
                Data = "xyz"
            };
            var response = AssertJsonResponse(() => Controller.SetRight(1, postData));

            Assert.AreEqual("{\"success\":true}", response);
        }
        public void TestSetLeftWithInvalidData()
        {
            StoreMock.Setup(store => store.SetLeft(1, "xyz")).Throws <FormatException>();
            var postData = new DiffController.DiffData {
                Data = "xyz"
            };
            var response = AssertUnprocessableEntityResponse(() => Controller.SetLeft(1, postData));

            Assert.AreEqual("{\"error\":\"Malformed Base64 string data\"}", response);
        }