public void GetsFromCorrectUrl()
            {
                var connection   = Substitute.For <IConnection>();
                var gitHubClient = new GitHubClient(connection);
                var client       = new ObservableGitHubAppsClient(gitHubClient);

                client.GetAllInstallationsForCurrentUser();

                connection.Received().Get <List <InstallationsResponse> >(
                    Arg.Is <Uri>(u => u.ToString() == "user/installations"),
                    null,
                    "application/vnd.github.machine-man-preview+json");
            }
            public void GetsFromCorrectUrlWithOptions()
            {
                var connection   = Substitute.For <IConnection>();
                var gitHubClient = new GitHubClient(connection);
                var client       = new ObservableGitHubAppsClient(gitHubClient);

                var options = new ApiOptions
                {
                    PageSize = 1
                };

                client.GetAllInstallationsForCurrentUser(options);

                connection.Received().Get <List <InstallationsResponse> >(
                    Arg.Is <Uri>(u => u.ToString() == "user/installations"),
                    Arg.Is <Dictionary <string, string> >(x =>
                                                          x.Count == 1 &&
                                                          x["per_page"] == "1"),
                    "application/vnd.github.machine-man-preview+json");
            }