public void FlattenActionTestCallOk()
    {
        var called = false;
        var action = FlattenAction.JsonFlatten <Foo>(result => {
            result.MatchOk(value => {
                called = true;
                Assert.AreEqual(value.userId, "123");
            });
        });

        action.CallOk(@"{""userId"": ""123""}");
        Assert.True(called);
    }
    public void FlattenActionTestCallError()
    {
        var called = false;
        var action = FlattenAction.JsonFlatten <Foo>(result => {
            result.MatchError(value => {
                called = true;
                Assert.AreEqual(value.Code, 123);
                Assert.AreEqual(value.Message, "test");
            });
        });

        action.CallError(@"{""code"": 123, ""message"":""test""}");
        Assert.True(called);
    }