@Consumes(APPLICATION_JSON) public Region expected(String baseUrl) { return Region.create( // "12912210600542709766", // id parse("2013-07-08T14:40:37.939-07:00"), // creationTimestamp URI.create(baseUrl + "/party/regions/us-central1"), // selfLink "us-central1", // name "us-central1", // description Region.Status.UP, // status ImmutableList.of(// URI.create(baseUrl + "/party/zones/us-central1-a"), URI.create(baseUrl + "/party/zones/us-central1-b")), // zones ImmutableList.of( // Quota.create("INSTANCES", 0, 8), // Quota.create("CPUS", 0, 8), // Quota.create("EPHEMERAL_ADDRESSES", 0, 8), // Quota.create("DISKS", 0, 8), // Quota.create("DISKS_TOTAL_GB", 0, 100), // Quota.create("SNAPSHOTS", 0, 1000), // Quota.create("NETWORKS", 1, 5), // Quota.create("FIREWALLS", 2, 100), // Quota.create("IMAGES", 0, 100)) // quotas ); } }
@Consumes(APPLICATION_JSON) public ListPage<Region> expected(String baseUrl) { Region region1 = new ParseRegionTest().expected(baseUrl); Region region2 = Region.create( // "6396763663251190992", // id parse("2013-07-08T14:40:37.939-07:00"), // creationTimestamp URI.create(baseUrl + "/party/regions/us-central2"), // selfLink "us-central2", // name "us-central2", // description Region.Status.UP, // status ImmutableList.of(URI.create(baseUrl + "/party/zones/us-central2-a")), // zones ImmutableList.of( // Quota.create("INSTANCES", 0, 8), // Quota.create("CPUS", 0, 8), // Quota.create("EPHEMERAL_ADDRESSES", 0, 8), // Quota.create("DISKS", 0, 8), // Quota.create("DISKS_TOTAL_GB", 0, 100), // Quota.create("SNAPSHOTS", 0, 1000), // Quota.create("NETWORKS", 1, 5), // Quota.create("FIREWALLS", 2, 100), // Quota.create("IMAGES", 0, 100)) // quotas ); return ForwardingListPage.create( // ImmutableList.of(region1, region2), // items null // nextPageToken ); } }