GetRemotePackageFeedAction action = new GetRemotePackageFeedAction(5, nupkgs, 0, 200, clientFactory);
Expectations expectations = new Expectations();
addExpectation(expectations, client, 5, 0, createPackageFeed("feed-1", createPackageEntry("package-1", "1.2.3"), createPackageEntry("package-2", "1.2.3")));
addExpectation(expectations, client, 2, 2, createPackageFeed("feed-2", createPackageEntry("package-3", "1.2.3"), createPackageEntry("package-4", "1.2.3")));
addExpectation(expectations, client, 2, 4, createPackageFeed("feed-3"));
expectations.oneOf(client).close();
expectations.atLeast(0).of(clientFactory).createClient();
expectations.will(returnValue(client));
context.checking(expectations);
//WHEN
action.loadPackages();