private static void AssertDoesGetAccessTokenUsingRefreshTokenCookie(IJsonServiceClient client)
    {
        var authResponse = client.Post(new Authenticate {
            provider = "credentials",
            UserName = Username,
            Password = Password
        });

        var initialAccessToken  = client.GetTokenCookie();
        var initialRefreshToken = client.GetRefreshTokenCookie();

        Assert.That(initialAccessToken, Is.Not.Null);
        Assert.That(initialRefreshToken, Is.Not.Null);

        var request = new Secured {
            Name = "test"
        };
        var response = client.Send(request);

        Assert.That(response.Result, Is.EqualTo(request.Name));

        var jwtAuthProvider = AuthenticateService.GetRequiredJwtAuthProvider();

        jwtAuthProvider.InvalidateJwtIds.Add(jwtAuthProvider.LastJwtId());
        // JwtAuthProvider.PrintDump(initialAccessToken);
        // JwtAuthProvider.PrintDump(initialRefreshToken);

        response = client.Send(request);
        Assert.That(response.Result, Is.EqualTo(request.Name));
        var latestAccessToken = client.GetTokenCookie();

        Assert.That(latestAccessToken, Is.Not.EqualTo(initialAccessToken));
    }