From 038e550d2d1e9493c28308fdac8daed7763e383b Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Sun, 30 Dec 2012 13:18:27 -0800 Subject: [PATCH] moved off deprecated FluentIterable methods --- .../features/MetricApiExpectTest.java | 2 +- .../jclouds/ec2/features/TagApiExpectTest.java | 4 ++-- .../features/internal/BaseTagApiLiveTest.java | 2 +- .../v1/features/SnapshotApiExpectTest.java | 8 ++++---- .../features/VolumeAndSnapshotApiLiveTest.java | 8 ++++---- .../v1/features/VolumeApiExpectTest.java | 8 ++++---- .../v1/features/VolumeTypeApiExpectTest.java | 2 +- .../v1/features/VolumeTypeApiLiveTest.java | 2 +- ...tionIdToURIFromAccessForTypeAndVersion.java | 2 +- .../v2_0/features/TenantApiExpectTest.java | 6 +++--- .../v2_0/features/TenantApiLiveTest.java | 2 +- .../v2_0/features/UserApiExpectTest.java | 4 ++-- .../v2_0/features/UserApiLiveTest.java | 4 ++-- .../compute/NovaComputeServiceAdapter.java | 2 +- .../v2_0/extensions/FloatingIPApiLiveTest.java | 6 +++--- .../HostAdministrationApiExpectTest.java | 4 ++-- .../HostAdministrationApiLiveTest.java | 2 +- .../extensions/HostAggregateApiLiveTest.java | 2 +- .../extensions/SecurityGroupApiLiveTest.java | 2 +- .../SimpleTenantUsageApiExpectTest.java | 2 +- .../SimpleTenantUsageApiLiveTest.java | 2 +- .../VirtualInterfaceApiLiveTest.java | 2 +- .../v2_0/extensions/VolumeApiExpectTest.java | 18 +++++++++--------- .../v2_0/extensions/VolumeApiLiveTest.java | 12 ++++++------ .../VolumeAttachmentApiExpectTest.java | 2 +- .../VolumeAttachmentApiLiveTest.java | 4 ++-- .../extensions/VolumeTypeApiExpectTest.java | 2 +- .../v2_0/extensions/VolumeTypeApiLiveTest.java | 2 +- .../nova/v2_0/features/FlavorApiLiveTest.java | 6 +++--- .../nova/v2_0/features/ImageApiLiveTest.java | 6 +++--- .../features/LoadBalancerApiExpectTest.java | 2 +- .../features/LoadBalancerApiLiveTest.java | 2 +- .../features/NodeApiExpectTest.java | 2 +- .../features/NodeApiLiveTest.java | 2 +- .../sqs/features/BulkMessageApiLiveTest.java | 2 +- .../util/ConcurrentOpenSocketFinder.java | 2 +- .../collect/TransformingSetSupplier.java | 2 +- .../main/java/org/jclouds/osgi/Bundles.java | 2 +- .../collect/AdvanceUntilEmptyIterableTest.java | 2 +- .../collect/IterableWithMarkersTest.java | 4 ++-- .../jclouds/collect/PagedIterablesTest.java | 2 +- .../features/LoadBalancerApiExpectTest.java | 4 ++-- .../iam/features/UserApiExpectTest.java | 2 +- .../glance/v1_0/features/ImageApiLiveTest.java | 4 ++-- .../v1_0/features/NetworkApiExpectTest.java | 4 ++-- .../v1_0/features/NetworkApiLiveTest.java | 4 ++-- .../v1_0/features/PortApiExpectTest.java | 4 ++-- .../quantum/v1_0/features/PortApiLiveTest.java | 6 +++--- .../v1/features/ContainerApiExpectTest.java | 2 +- .../rds/features/InstanceApiExpectTest.java | 2 +- .../features/SecurityGroupApiExpectTest.java | 2 +- .../rds/features/SubnetGroupApiExpectTest.java | 2 +- .../compute/GleSYSComputeServiceAdapter.java | 2 +- .../glesys/features/ArchiveApiExpectTest.java | 2 +- .../features/EmailAccountApiExpectTest.java | 2 +- .../glesys/features/IpApiExpectTest.java | 4 ++-- .../glesys/features/ServerApiExpectTest.java | 4 ++-- 57 files changed, 102 insertions(+), 102 deletions(-) diff --git a/apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/features/MetricApiExpectTest.java b/apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/features/MetricApiExpectTest.java index a5f6e65647..7e40a2b11e 100644 --- a/apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/features/MetricApiExpectTest.java +++ b/apis/cloudwatch/src/test/java/org/jclouds/cloudwatch/features/MetricApiExpectTest.java @@ -85,7 +85,7 @@ public class MetricApiExpectTest extends BaseCloudWatchApiExpectTest { CloudWatchApi apiWhenMetricsDontExist = requestSendsResponse( listMetrics, listMetricsResponse); - assertEquals(apiWhenMetricsDontExist.getMetricApiForRegion(null).list().get(0).toImmutableSet(), ImmutableSet.of()); + assertEquals(apiWhenMetricsDontExist.getMetricApiForRegion(null).list().get(0).toSet(), ImmutableSet.of()); } public void testListMetrics2PagesWhenResponseIs2xx() throws Exception { diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/features/TagApiExpectTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/features/TagApiExpectTest.java index f451581ea2..3e36be53b7 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/features/TagApiExpectTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/features/TagApiExpectTest.java @@ -166,7 +166,7 @@ public class TagApiExpectTest extends BaseEC2ApiExpectTest { EC2Api apiWhenDontExist = requestSendsResponse( list, listResponse); - assertEquals(apiWhenDontExist.getTagApi().get().list().toImmutableSet(), ImmutableSet.of()); + assertEquals(apiWhenDontExist.getTagApi().get().list().toSet(), ImmutableSet.of()); } HttpRequest filter = @@ -212,7 +212,7 @@ public class TagApiExpectTest extends BaseEC2ApiExpectTest { assertEquals(apiWhenDontExist.getTagApi().get().filter(ImmutableMultimap. builder() .put("resource-type", "instance") .put("key", "stack") - .build()).toImmutableSet(), ImmutableSet.of()); + .build()).toSet(), ImmutableSet.of()); } HttpRequest delete = HttpRequest.builder() diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/features/internal/BaseTagApiLiveTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/features/internal/BaseTagApiLiveTest.java index 9fd8ebbf83..25ca532476 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/features/internal/BaseTagApiLiveTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/features/internal/BaseTagApiLiveTest.java @@ -94,7 +94,7 @@ public abstract class BaseTagApiLiveTest extends BaseEC2ApiLiveTest { public boolean apply(Tag in) { return in.getResourceId().equals(resource.id); } - }).toImmutableSet().equals(input); + }).toSet().equals(input); } }, 600, 200, 200, TimeUnit.MILLISECONDS).apply(ImmutableSet.of(tag, tag2))); diff --git a/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/SnapshotApiExpectTest.java b/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/SnapshotApiExpectTest.java index b42c27e801..0bb2891553 100644 --- a/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/SnapshotApiExpectTest.java +++ b/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/SnapshotApiExpectTest.java @@ -60,7 +60,7 @@ public class SnapshotApiExpectTest extends BaseCinderApiExpectTest { HttpResponse.builder().statusCode(200).payload(payloadFromResource("/snapshot_list_simple.json")).build() ).getSnapshotApiForZone("RegionOne"); - Set snapshots = api.list().toImmutableSet(); + Set snapshots = api.list().toSet(); assertEquals(snapshots, ImmutableSet.of(testSnapshot())); } @@ -73,7 +73,7 @@ public class SnapshotApiExpectTest extends BaseCinderApiExpectTest { HttpResponse.builder().statusCode(404).build() ).getSnapshotApiForZone("RegionOne"); - Set snapshots = api.list().toImmutableSet(); + Set snapshots = api.list().toSet(); assertTrue(snapshots.isEmpty()); } @@ -86,7 +86,7 @@ public class SnapshotApiExpectTest extends BaseCinderApiExpectTest { HttpResponse.builder().statusCode(200).payload(payloadFromResource("/snapshot_list_details.json")).build() ).getSnapshotApiForZone("RegionOne"); - Set snapshots = api.listInDetail().toImmutableSet(); + Set snapshots = api.listInDetail().toSet(); assertEquals(snapshots, ImmutableSet.of(testSnapshot())); // double-check individual fields @@ -108,7 +108,7 @@ public class SnapshotApiExpectTest extends BaseCinderApiExpectTest { HttpResponse.builder().statusCode(404).build() ).getSnapshotApiForZone("RegionOne"); - Set snapshots = api.listInDetail().toImmutableSet(); + Set snapshots = api.listInDetail().toSet(); assertTrue(snapshots.isEmpty()); } diff --git a/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeAndSnapshotApiLiveTest.java b/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeAndSnapshotApiLiveTest.java index 6880767158..7590a08589 100644 --- a/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeAndSnapshotApiLiveTest.java +++ b/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeAndSnapshotApiLiveTest.java @@ -92,7 +92,7 @@ public class VolumeAndSnapshotApiLiveTest extends BaseCinderApiLiveTest { @Test(dependsOnMethods = "testCreateVolume") public void testListVolumes() { - Set volumes = volumeApi.list().toImmutableSet(); + Set volumes = volumeApi.list().toSet(); assertNotNull(volumes); boolean foundIt = false; for (Volume vol : volumes) { @@ -107,7 +107,7 @@ public class VolumeAndSnapshotApiLiveTest extends BaseCinderApiLiveTest { @Test(dependsOnMethods = "testCreateVolume") public void testListVolumesInDetail() { - Set volumes = volumeApi.listInDetail().toImmutableSet(); + Set volumes = volumeApi.listInDetail().toSet(); assertNotNull(volumes); boolean foundIt = false; for (Volume vol : volumes) { @@ -146,7 +146,7 @@ public class VolumeAndSnapshotApiLiveTest extends BaseCinderApiLiveTest { @Test(dependsOnMethods = "testCreateSnapshot") public void testListSnapshots() { - Set snapshots = snapshotApi.list().toImmutableSet(); + Set snapshots = snapshotApi.list().toSet(); assertNotNull(snapshots); boolean foundIt = false; for (Snapshot snap : snapshots) { @@ -163,7 +163,7 @@ public class VolumeAndSnapshotApiLiveTest extends BaseCinderApiLiveTest { @Test(dependsOnMethods = "testCreateSnapshot") public void testListSnapshotsInDetail() { - Set snapshots = snapshotApi.listInDetail().toImmutableSet(); + Set snapshots = snapshotApi.listInDetail().toSet(); assertNotNull(snapshots); boolean foundIt = false; for (Snapshot snap : snapshots) { diff --git a/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeApiExpectTest.java b/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeApiExpectTest.java index 89c2cacf57..ba4fbeaf85 100644 --- a/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeApiExpectTest.java +++ b/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeApiExpectTest.java @@ -59,7 +59,7 @@ public class VolumeApiExpectTest extends BaseCinderApiExpectTest { HttpResponse.builder().statusCode(200).payload(payloadFromResource("/volume_list_simple.json")).build() ).getVolumeApiForZone("RegionOne"); - Set volumes = api.list().toImmutableSet(); + Set volumes = api.list().toSet(); assertEquals(volumes, ImmutableSet.of(testVolume())); } @@ -72,7 +72,7 @@ public class VolumeApiExpectTest extends BaseCinderApiExpectTest { HttpResponse.builder().statusCode(404).build() ).getVolumeApiForZone("RegionOne"); - Set volumes = api.list().toImmutableSet(); + Set volumes = api.list().toSet(); assertTrue(volumes.isEmpty()); } @@ -85,7 +85,7 @@ public class VolumeApiExpectTest extends BaseCinderApiExpectTest { HttpResponse.builder().statusCode(200).payload(payloadFromResource("/volume_list_details.json")).build() ).getVolumeApiForZone("RegionOne"); - Set volumes = api.listInDetail().toImmutableSet(); + Set volumes = api.listInDetail().toSet(); assertEquals(volumes, ImmutableSet.of(testVolume())); } @@ -98,7 +98,7 @@ public class VolumeApiExpectTest extends BaseCinderApiExpectTest { HttpResponse.builder().statusCode(404).build() ).getVolumeApiForZone("RegionOne"); - Set volumes = api.listInDetail().toImmutableSet(); + Set volumes = api.listInDetail().toSet(); assertTrue(volumes.isEmpty()); } diff --git a/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeTypeApiExpectTest.java b/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeTypeApiExpectTest.java index 5adb19e3a0..955083564e 100644 --- a/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeTypeApiExpectTest.java +++ b/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeTypeApiExpectTest.java @@ -52,7 +52,7 @@ public class VolumeTypeApiExpectTest extends BaseCinderApiExpectTest { HttpResponse.builder().statusCode(200).payload(payloadFromResource("/volume_type_list_simple.json")).build() ).getVolumeTypeApiForZone("RegionOne"); - Set types = api.list().toImmutableSet(); + Set types = api.list().toSet(); assertEquals(types, ImmutableSet.of(testVolumeType())); } diff --git a/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeTypeApiLiveTest.java b/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeTypeApiLiveTest.java index 293ae59976..ee6af22ba7 100644 --- a/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeTypeApiLiveTest.java +++ b/apis/openstack-cinder/src/test/java/org/jclouds/openstack/cinder/v1/features/VolumeTypeApiLiveTest.java @@ -55,7 +55,7 @@ public class VolumeTypeApiLiveTest extends BaseCinderApiLiveTest { } public void testListAndGetVolumeTypes() { - Set volumeTypes = volumeTypeApi.list().toImmutableSet(); + Set volumeTypes = volumeTypeApi.list().toSet(); assertNotNull(volumeTypes); for (VolumeType vt : volumeTypes) { diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/suppliers/LocationIdToURIFromAccessForTypeAndVersion.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/suppliers/LocationIdToURIFromAccessForTypeAndVersion.java index a4b968f54c..5b9b8ccb4b 100644 --- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/suppliers/LocationIdToURIFromAccessForTypeAndVersion.java +++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/suppliers/LocationIdToURIFromAccessForTypeAndVersion.java @@ -95,7 +95,7 @@ public class LocationIdToURIFromAccessForTypeAndVersion implements Supplier> get() { FluentIterable services = FluentIterable.from(access.get()).filter(apiTypeEquals); - if (services.toImmutableSet().size() == 0) + if (services.toSet().size() == 0) throw new NoSuchElementException(String.format("apiType %s not found in catalog %s", apiType, services)); Iterable endpoints = concat(services); diff --git a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/TenantApiExpectTest.java b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/TenantApiExpectTest.java index 6d37a3de07..7bb1a86ac8 100644 --- a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/TenantApiExpectTest.java +++ b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/TenantApiExpectTest.java @@ -61,7 +61,7 @@ public class TenantApiExpectTest extends BaseKeystoneRestApiExpectTest tenants = api.list(new PaginationOptions()).toImmutableSet(); + Set tenants = api.list(new PaginationOptions()).toSet(); assertNotNull(tenants); assertFalse(tenants.isEmpty()); @@ -93,7 +93,7 @@ public class TenantApiExpectTest extends BaseKeystoneRestApiExpectTest expected = ImmutableSet.of(Tenant.builder().name("this-is-a-test").id("14").description("None").build()); - assertEquals(api.list().concat().toImmutableSet(), expected); + assertEquals(api.list().concat().toSet(), expected); } // this is not a compatible format of json per: diff --git a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/TenantApiLiveTest.java b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/TenantApiLiveTest.java index e3a40336d7..c5a55a8425 100644 --- a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/TenantApiLiveTest.java +++ b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/TenantApiLiveTest.java @@ -38,7 +38,7 @@ public class TenantApiLiveTest extends BaseKeystoneApiLiveTest { public void testTenants() { TenantApi api = keystoneContext.getApi().getTenantApi().get(); - Set result = api.list().concat().toImmutableSet(); + Set result = api.list().concat().toSet(); assertNotNull(result); assertFalse(result.isEmpty()); diff --git a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/UserApiExpectTest.java b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/UserApiExpectTest.java index 104a96fb65..3818e46860 100644 --- a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/UserApiExpectTest.java +++ b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/UserApiExpectTest.java @@ -66,7 +66,7 @@ public class UserApiExpectTest extends BaseKeystoneRestApiExpectTest users = api.list().concat().toImmutableSet(); + Set users = api.list().concat().toSet(); assertNotNull(users); assertFalse(users.isEmpty()); for (User user : users) { @@ -54,7 +54,7 @@ public class UserApiLiveTest extends BaseKeystoneApiLiveTest { public void testUserRolesOnTenant() { UserApi api = keystoneContext.getApi().getUserApi().get(); - Set tenants = keystoneContext.getApi().getTenantApi().get().list().concat().toImmutableSet(); + Set tenants = keystoneContext.getApi().getTenantApi().get().list().concat().toSet(); for (User user : api.list().concat()) { for (Tenant tenant : tenants) { diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/NovaComputeServiceAdapter.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/NovaComputeServiceAdapter.java index e7048b15a0..fadcbb7b60 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/NovaComputeServiceAdapter.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/NovaComputeServiceAdapter.java @@ -159,7 +159,7 @@ public class NovaComputeServiceAdapter implements Set zones = zoneIds.get(); checkState(zones.size() > 0, "no zones found in supplier %s", zoneIds); for (final String zoneId : zones) { - Set images = novaApi.getImageApiForZone(zoneId).listInDetail().concat().toImmutableSet(); + Set images = novaApi.getImageApiForZone(zoneId).listInDetail().concat().toSet(); if (images.size() == 0) { logger.debug("no images found in zone %s", zoneId); continue; diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/FloatingIPApiLiveTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/FloatingIPApiLiveTest.java index 164be4fdbc..ef8911b13a 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/FloatingIPApiLiveTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/FloatingIPApiLiveTest.java @@ -52,7 +52,7 @@ public class FloatingIPApiLiveTest extends BaseNovaApiLiveTest { if (!apiOption.isPresent()) continue; FloatingIPApi api = apiOption.get(); - Set response = api.list().toImmutableSet(); + Set response = api.list().toSet(); assert null != response; assertTrue(response.size() >= 0); for (FloatingIP ip : response) { @@ -77,7 +77,7 @@ public class FloatingIPApiLiveTest extends BaseNovaApiLiveTest { FloatingIP floatingIP = api.create(); assertNotNull(floatingIP); - Set response = api.list().toImmutableSet(); + Set response = api.list().toSet(); boolean ipInSet = false; for (FloatingIP ip : response) { if (ip.getId().equals(floatingIP.getId())) @@ -87,7 +87,7 @@ public class FloatingIPApiLiveTest extends BaseNovaApiLiveTest { api.delete(floatingIP.getId()); - response = api.list().toImmutableSet(); + response = api.list().toSet(); ipInSet = false; for (FloatingIP ip : response) { if (ip.getId().equals(floatingIP.getId())) { diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/HostAdministrationApiExpectTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/HostAdministrationApiExpectTest.java index f280603328..6dbed0789a 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/HostAdministrationApiExpectTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/HostAdministrationApiExpectTest.java @@ -59,7 +59,7 @@ public class HostAdministrationApiExpectTest extends BaseNovaApiExpectTest { Host expected = Host.builder().name("ubuntu").service("compute").build(); - Set result = api.list().toImmutableSet(); + Set result = api.list().toSet(); Host host = Iterables.getOnlyElement(result); assertEquals(host.getName(), "ubuntu"); assertEquals(host.getService(), "compute"); @@ -84,7 +84,7 @@ public class HostAdministrationApiExpectTest extends BaseNovaApiExpectTest { HostResourceUsage.builder().memoryMb(6144).project("f8535069c3fb404cb61c873b1a0b4921").cpu(3).diskGb(80).host("ubuntu").build() ); - assertEquals(api.listResourceUsage("xyz").toImmutableSet(), expected); + assertEquals(api.listResourceUsage("xyz").toSet(), expected); } public void testEnableHost() { diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/HostAdministrationApiLiveTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/HostAdministrationApiLiveTest.java index d9f0fe8c4d..b29aadd174 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/HostAdministrationApiLiveTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/HostAdministrationApiLiveTest.java @@ -65,7 +65,7 @@ public class HostAdministrationApiLiveTest extends BaseNovaApiLiveTest { public void testListAndGet() throws Exception { if (optApi.isPresent()) { HostAdministrationApi api = optApi.get(); - Set hosts = api.list().toImmutableSet(); + Set hosts = api.list().toSet(); assertNotNull(hosts); for (Host host : hosts) { for (HostResourceUsage usage : api.listResourceUsage(host.getName())) { diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/HostAggregateApiLiveTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/HostAggregateApiLiveTest.java index 339bbf9f24..3bb1ecf709 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/HostAggregateApiLiveTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/HostAggregateApiLiveTest.java @@ -78,7 +78,7 @@ public class HostAggregateApiLiveTest extends BaseNovaApiLiveTest { public void testListAndGetAggregate() { if (apiOption.isPresent()) { HostAggregateApi api = apiOption.get(); - Set aggregates = api.list().toImmutableSet(); + Set aggregates = api.list().toSet(); for (HostAggregate aggregate : aggregates) { assertNotNull(aggregate.getId()); assertNotNull(aggregate.getName()); diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupApiLiveTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupApiLiveTest.java index b3555bcf06..3147b7604a 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupApiLiveTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/SecurityGroupApiLiveTest.java @@ -44,7 +44,7 @@ public class SecurityGroupApiLiveTest extends BaseNovaApiLiveTest { public void list() throws Exception { for (String zoneId : novaContext.getApi().getConfiguredZones()) { SecurityGroupApi api = novaContext.getApi().getSecurityGroupExtensionForZone(zoneId).get(); - Set securityGroupsList = api.list().toImmutableSet(); + Set securityGroupsList = api.list().toSet(); assertNotNull(securityGroupsList); } } diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageApiExpectTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageApiExpectTest.java index d99e66bb6f..d9b5458e1c 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageApiExpectTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageApiExpectTest.java @@ -58,7 +58,7 @@ public class SimpleTenantUsageApiExpectTest extends BaseNovaApiExpectTest { .payload(payloadFromResource("/simple_tenant_usages.json")).build()) .getSimpleTenantUsageExtensionForZone("az-1.region-a.geo-1").get(); - Set results = api.list().toImmutableSet(); + Set results = api.list().toSet(); SimpleTenantUsage usage = Iterables.getOnlyElement(results); assertEquals(usage.getTenantId(), "f8535069c3fb404cb61c873b1a0b4921"); diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageApiLiveTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageApiLiveTest.java index 887481a56f..f43709eba7 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageApiLiveTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/SimpleTenantUsageApiLiveTest.java @@ -41,7 +41,7 @@ public class SimpleTenantUsageApiLiveTest extends BaseNovaApiLiveTest { Optional optApi = novaContext.getApi().getSimpleTenantUsageExtensionForZone(zoneId); if (optApi.isPresent() && identity.endsWith(":admin")) { SimpleTenantUsageApi api = optApi.get(); - Set usages = api.list().toImmutableSet(); + Set usages = api.list().toSet(); assertNotNull(usages); for (SimpleTenantUsage usage : usages) { SimpleTenantUsage details = api.get(usage.getTenantId()); diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceApiLiveTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceApiLiveTest.java index 8047bcae93..f1d276d729 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceApiLiveTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VirtualInterfaceApiLiveTest.java @@ -55,7 +55,7 @@ public class VirtualInterfaceApiLiveTest extends BaseNovaApiLiveTest { Server testServer = null; try { testServer = createServerInZone(zone); - Set results = apiOption.get().listOnServer(testServer.getId()).toImmutableSet(); + Set results = apiOption.get().listOnServer(testServer.getId()).toSet(); for (VirtualInterface vif : results) { assertNotNull(vif.getId()); assertNotNull(vif.getMacAddress()); diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeApiExpectTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeApiExpectTest.java index 25b036a4da..430f72c0b8 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeApiExpectTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeApiExpectTest.java @@ -62,7 +62,7 @@ public class VolumeApiExpectTest extends BaseNovaApiExpectTest { HttpResponse.builder().statusCode(200).payload(payloadFromResource("/volume_list.json")).build() ).getVolumeExtensionForZone("az-1.region-a.geo-1").get(); - Set volumes = api.list().toImmutableSet(); + Set volumes = api.list().toSet(); assertEquals(volumes, ImmutableSet.of(testVolume())); } @@ -75,7 +75,7 @@ public class VolumeApiExpectTest extends BaseNovaApiExpectTest { HttpResponse.builder().statusCode(404).build() ).getVolumeExtensionForZone("az-1.region-a.geo-1").get(); - Set volumes = api.list().toImmutableSet(); + Set volumes = api.list().toSet(); assertTrue(volumes.isEmpty()); } @@ -88,7 +88,7 @@ public class VolumeApiExpectTest extends BaseNovaApiExpectTest { HttpResponse.builder().statusCode(200).payload(payloadFromResource("/volume_list_detail.json")).build() ).getVolumeExtensionForZone("az-1.region-a.geo-1").get(); - Set volumes = api.listInDetail().toImmutableSet(); + Set volumes = api.listInDetail().toSet(); assertEquals(volumes, ImmutableSet.of(testVolume())); } @@ -101,7 +101,7 @@ public class VolumeApiExpectTest extends BaseNovaApiExpectTest { HttpResponse.builder().statusCode(404).build() ).getVolumeExtensionForZone("az-1.region-a.geo-1").get(); - Set volumes = api.listInDetail().toImmutableSet(); + Set volumes = api.listInDetail().toSet(); assertTrue(volumes.isEmpty()); } @@ -203,7 +203,7 @@ public class VolumeApiExpectTest extends BaseNovaApiExpectTest { HttpResponse.builder().statusCode(200).payload(payloadFromResource("/attachment_list.json")).build() ).getVolumeExtensionForZone("az-1.region-a.geo-1").get(); - Set attachments = api.listAttachmentsOnServer("instance-1").toImmutableSet(); + Set attachments = api.listAttachmentsOnServer("instance-1").toSet(); assertEquals(attachments, ImmutableSet.of(testAttachment())); // double-check individual fields VolumeAttachment attachment = Iterables.getOnlyElement(attachments); @@ -312,7 +312,7 @@ public class VolumeApiExpectTest extends BaseNovaApiExpectTest { HttpResponse.builder().statusCode(200).payload(payloadFromResource("/snapshot_list.json")).build() ).getVolumeExtensionForZone("az-1.region-a.geo-1").get(); - Set snapshots = api.listSnapshots().toImmutableSet(); + Set snapshots = api.listSnapshots().toSet(); assertEquals(snapshots, ImmutableSet.of(testSnapshot())); } @@ -325,7 +325,7 @@ public class VolumeApiExpectTest extends BaseNovaApiExpectTest { HttpResponse.builder().statusCode(404).build() ).getVolumeExtensionForZone("az-1.region-a.geo-1").get(); - Set snapshots = api.listSnapshots().toImmutableSet(); + Set snapshots = api.listSnapshots().toSet(); assertTrue(snapshots.isEmpty()); } @@ -363,7 +363,7 @@ public class VolumeApiExpectTest extends BaseNovaApiExpectTest { HttpResponse.builder().statusCode(200).payload(payloadFromResource("/snapshot_list_detail.json")).build() ).getVolumeExtensionForZone("az-1.region-a.geo-1").get(); - Set snapshots = api.listSnapshotsInDetail().toImmutableSet(); + Set snapshots = api.listSnapshotsInDetail().toSet(); assertEquals(snapshots, ImmutableSet.of(testSnapshot())); // double-check individual fields @@ -385,7 +385,7 @@ public class VolumeApiExpectTest extends BaseNovaApiExpectTest { HttpResponse.builder().statusCode(404).build() ).getVolumeExtensionForZone("az-1.region-a.geo-1").get(); - Set snapshots = api.listSnapshotsInDetail().toImmutableSet(); + Set snapshots = api.listSnapshotsInDetail().toSet(); assertTrue(snapshots.isEmpty()); } diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeApiLiveTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeApiLiveTest.java index 4e1efbf00b..13893b849a 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeApiLiveTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeApiLiveTest.java @@ -108,7 +108,7 @@ public class VolumeApiLiveTest extends BaseNovaApiLiveTest { @Test(dependsOnMethods = "testCreateVolume") public void testListVolumes() { if (volumeOption.isPresent()) { - Set volumes = volumeOption.get().list().toImmutableSet(); + Set volumes = volumeOption.get().list().toSet(); assertNotNull(volumes); boolean foundIt = false; for (Volume vol : volumes) { @@ -125,7 +125,7 @@ public class VolumeApiLiveTest extends BaseNovaApiLiveTest { @Test(dependsOnMethods = "testCreateVolume") public void testListVolumesInDetail() { if (volumeOption.isPresent()) { - Set volumes = volumeOption.get().listInDetail().toImmutableSet(); + Set volumes = volumeOption.get().listInDetail().toSet(); assertNotNull(volumes); boolean foundIt = false; for (Volume vol : volumes) { @@ -174,7 +174,7 @@ public class VolumeApiLiveTest extends BaseNovaApiLiveTest { @Test(dependsOnMethods = "testCreateSnapshot") public void testListSnapshots() { if (volumeOption.isPresent()) { - Set snapshots = volumeOption.get().listSnapshots().toImmutableSet(); + Set snapshots = volumeOption.get().listSnapshots().toSet(); assertNotNull(snapshots); boolean foundIt = false; for (VolumeSnapshot snap : snapshots) { @@ -193,7 +193,7 @@ public class VolumeApiLiveTest extends BaseNovaApiLiveTest { @Test(dependsOnMethods = "testCreateSnapshot") public void testListSnapshotsInDetail() { if (volumeOption.isPresent()) { - Set snapshots = volumeOption.get().listSnapshotsInDetail().toImmutableSet(); + Set snapshots = volumeOption.get().listSnapshotsInDetail().toSet(); assertNotNull(snapshots); boolean foundIt = false; for (VolumeSnapshot snap : snapshots) { @@ -225,7 +225,7 @@ public class VolumeApiLiveTest extends BaseNovaApiLiveTest { try { final String serverId = server_id = createServerInZone(zone).getId(); - Set attachments = volumeOption.get().listAttachmentsOnServer(serverId).toImmutableSet(); + Set attachments = volumeOption.get().listAttachmentsOnServer(serverId).toSet(); assertNotNull(attachments); final int before = attachments.size(); @@ -241,7 +241,7 @@ public class VolumeApiLiveTest extends BaseNovaApiLiveTest { } }, 60 * 1000L).apply(volumeOption.get())); - attachments = volumeOption.get().listAttachmentsOnServer(serverId).toImmutableSet(); + attachments = volumeOption.get().listAttachmentsOnServer(serverId).toSet(); assertNotNull(attachments); assertEquals(attachments.size(), before + 1); diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApiExpectTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApiExpectTest.java index 11bbfa4b03..8e4f63d0c2 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApiExpectTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApiExpectTest.java @@ -59,7 +59,7 @@ public class VolumeAttachmentApiExpectTest extends BaseNovaApiExpectTest { HttpResponse.builder().statusCode(200).payload(payloadFromResource("/attachment_list.json")).build() ).getVolumeAttachmentExtensionForZone("az-1.region-a.geo-1").get(); - Set attachments = api.listAttachmentsOnServer("instance-1").toImmutableSet(); + Set attachments = api.listAttachmentsOnServer("instance-1").toSet(); assertEquals(attachments, ImmutableSet.of(testAttachment())); // double-check individual fields VolumeAttachment attachment = Iterables.getOnlyElement(attachments); diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApiLiveTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApiLiveTest.java index 40368bc4af..6785473d8b 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApiLiveTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApiLiveTest.java @@ -105,7 +105,7 @@ public class VolumeAttachmentApiLiveTest extends BaseNovaApiLiveTest { final String serverId = server_id = createServerInZone(zone).getId(); Set attachments = - volumeAttachmentApi.get().listAttachmentsOnServer(serverId).toImmutableSet(); + volumeAttachmentApi.get().listAttachmentsOnServer(serverId).toSet(); assertNotNull(attachments); final int before = attachments.size(); @@ -121,7 +121,7 @@ public class VolumeAttachmentApiLiveTest extends BaseNovaApiLiveTest { } }, 60 * 1000L).apply(volumeAttachmentApi.get())); - attachments = volumeAttachmentApi.get().listAttachmentsOnServer(serverId).toImmutableSet(); + attachments = volumeAttachmentApi.get().listAttachmentsOnServer(serverId).toSet(); assertNotNull(attachments); assertEquals(attachments.size(), before + 1); diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeApiExpectTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeApiExpectTest.java index 24574ef46a..325947dfa2 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeApiExpectTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeApiExpectTest.java @@ -57,7 +57,7 @@ public class VolumeTypeApiExpectTest extends BaseNovaApiExpectTest { HttpResponse.builder().statusCode(200).payload(payloadFromResource("/volume_type_list.json")).build() ).getVolumeTypeExtensionForZone("az-1.region-a.geo-1").get(); - Set types = api.list().toImmutableSet(); + Set types = api.list().toSet(); assertEquals(types, ImmutableSet.of(testVolumeType())); } diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeApiLiveTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeApiLiveTest.java index 3733c4beb9..57d9839476 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeApiLiveTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeTypeApiLiveTest.java @@ -97,7 +97,7 @@ public class VolumeTypeApiLiveTest extends BaseNovaApiLiveTest { @Test(dependsOnMethods = "testCreateVolumeType") public void testListVolumeTypes() { if (volumeTypeOption.isPresent()) { - Set volumeTypes = volumeTypeOption.get().list().toImmutableSet(); + Set volumeTypes = volumeTypeOption.get().list().toSet(); assertNotNull(volumeTypes); boolean foundIt = false; for (VolumeType vt : volumeTypes) { diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/features/FlavorApiLiveTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/features/FlavorApiLiveTest.java index a45e6bfce4..23303065f3 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/features/FlavorApiLiveTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/features/FlavorApiLiveTest.java @@ -47,7 +47,7 @@ public class FlavorApiLiveTest extends BaseNovaApiLiveTest { public void testListFlavors() throws Exception { for (String zoneId : zones) { FlavorApi api = novaContext.getApi().getFlavorApiForZone(zoneId); - Set response = api.list().concat().toImmutableSet(); + Set response = api.list().concat().toSet(); assertNotNull(response); assertFalse(response.isEmpty()); for (Resource flavor : response) { @@ -67,7 +67,7 @@ public class FlavorApiLiveTest extends BaseNovaApiLiveTest { public void testListFlavorsInDetail() throws Exception { for (String zoneId : zones) { FlavorApi api = novaContext.getApi().getFlavorApiForZone(zoneId); - Set response = api.listInDetail().concat().toImmutableSet(); + Set response = api.listInDetail().concat().toSet(); assertNotNull(response); assertFalse(response.isEmpty()); for (Flavor flavor : response) { @@ -90,7 +90,7 @@ public class FlavorApiLiveTest extends BaseNovaApiLiveTest { public void testGetFlavorById() throws Exception { for (String zoneId : zones) { FlavorApi api = novaContext.getApi().getFlavorApiForZone(zoneId); - Set response = api.listInDetail().concat().toImmutableSet(); + Set response = api.listInDetail().concat().toSet(); for (Flavor flavor : response) { Flavor details = api.get(flavor.getId()); assertNotNull(details); diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/features/ImageApiLiveTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/features/ImageApiLiveTest.java index 678115aa6c..96e30e8880 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/features/ImageApiLiveTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/features/ImageApiLiveTest.java @@ -42,7 +42,7 @@ public class ImageApiLiveTest extends BaseNovaApiLiveTest { public void testListImages() throws Exception { for (String zoneId : zones) { ImageApi api = novaContext.getApi().getImageApiForZone(zoneId); - Set response = api.list().concat().toImmutableSet(); + Set response = api.list().concat().toSet(); assertNotNull(response); assertFalse(response.isEmpty()); for (Resource image : response) { @@ -57,7 +57,7 @@ public class ImageApiLiveTest extends BaseNovaApiLiveTest { public void testListImagesInDetail() throws Exception { for (String zoneId : novaContext.getApi().getConfiguredZones()) { ImageApi api = novaContext.getApi().getImageApiForZone(zoneId); - Set response = api.listInDetail().concat().toImmutableSet(); + Set response = api.listInDetail().concat().toSet(); assertNotNull(response); assertFalse(response.isEmpty()); for (Image image : response) { @@ -81,7 +81,7 @@ public class ImageApiLiveTest extends BaseNovaApiLiveTest { public void testGetImageById() throws Exception { for (String zoneId : novaContext.getApi().getConfiguredZones()) { ImageApi api = novaContext.getApi().getImageApiForZone(zoneId); - Set response = api.listInDetail().concat().toImmutableSet(); + Set response = api.listInDetail().concat().toSet(); for (Image image : response) { Image details = api.get(image.getId()); assertNotNull(details); diff --git a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/features/LoadBalancerApiExpectTest.java b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/features/LoadBalancerApiExpectTest.java index f8808f01fb..3e9ea0e440 100644 --- a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/features/LoadBalancerApiExpectTest.java +++ b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/features/LoadBalancerApiExpectTest.java @@ -54,7 +54,7 @@ public class LoadBalancerApiExpectTest extends BaseCloudLoadBalancerApiExpectTes HttpResponse.builder().statusCode(200).payload(payloadFromResource("/loadbalancers-list.json")).build() ).getLoadBalancerApiForZone("DFW"); - Set loadBalancers = api.list().concat().toImmutableSet(); + Set loadBalancers = api.list().concat().toSet(); assertEquals(loadBalancers, testLoadBalancers()); } diff --git a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/features/LoadBalancerApiLiveTest.java b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/features/LoadBalancerApiLiveTest.java index d3af2768dc..ae55013038 100644 --- a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/features/LoadBalancerApiLiveTest.java +++ b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/features/LoadBalancerApiLiveTest.java @@ -106,7 +106,7 @@ public class LoadBalancerApiLiveTest extends BaseCloudLoadBalancersApiLiveTest { public void testListLoadBalancers() throws Exception { for (String zone: clbApi.getConfiguredZones()) { - Set response = clbApi.getLoadBalancerApiForZone(zone).list().concat().toImmutableSet(); + Set response = clbApi.getLoadBalancerApiForZone(zone).list().concat().toSet(); assertNotNull(response); assertTrue(response.size() >= 0); diff --git a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/features/NodeApiExpectTest.java b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/features/NodeApiExpectTest.java index c47897f384..3fb46dfc6e 100644 --- a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/features/NodeApiExpectTest.java +++ b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/features/NodeApiExpectTest.java @@ -51,7 +51,7 @@ public class NodeApiExpectTest extends BaseCloudLoadBalancerApiExpectTest nodes = api.list().concat().toImmutableSet(); + Set nodes = api.list().concat().toSet(); assertEquals(nodes, testNodes()); } diff --git a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/features/NodeApiLiveTest.java b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/features/NodeApiLiveTest.java index c2cd40f002..edcc4a181c 100644 --- a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/features/NodeApiLiveTest.java +++ b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/features/NodeApiLiveTest.java @@ -105,7 +105,7 @@ public class NodeApiLiveTest extends BaseCloudLoadBalancersApiLiveTest { @Test(dependsOnMethods = "testModifyNode") public void testListNodes() throws Exception { for (LoadBalancer lb : nodes.keySet()) { - Set response = clbApi.getNodeApiForZoneAndLoadBalancer(lb.getRegion(), lb.getId()).list().concat().toImmutableSet(); + Set response = clbApi.getNodeApiForZoneAndLoadBalancer(lb.getRegion(), lb.getId()).list().concat().toSet(); assert null != response; assertTrue(response.size() >= 0); for (Node n : response) { diff --git a/apis/sqs/src/test/java/org/jclouds/sqs/features/BulkMessageApiLiveTest.java b/apis/sqs/src/test/java/org/jclouds/sqs/features/BulkMessageApiLiveTest.java index 3c9ad94259..d09a0f5f8b 100644 --- a/apis/sqs/src/test/java/org/jclouds/sqs/features/BulkMessageApiLiveTest.java +++ b/apis/sqs/src/test/java/org/jclouds/sqs/features/BulkMessageApiLiveTest.java @@ -111,7 +111,7 @@ public class BulkMessageApiLiveTest extends BaseSQSApiLiveTest { } protected Set collectMessages(MessageApi api) { - return SQS.receiveAllAtRate(api, idPayload.size(), attribute("None").visibilityTimeout(5)).toImmutableSet(); + return SQS.receiveAllAtRate(api, idPayload.size(), attribute("None").visibilityTimeout(5)).toSet(); } @Test(dependsOnMethods = "testChangeMessageVisibility") diff --git a/compute/src/main/java/org/jclouds/compute/util/ConcurrentOpenSocketFinder.java b/compute/src/main/java/org/jclouds/compute/util/ConcurrentOpenSocketFinder.java index 377e80d38f..bd8d5ccfcd 100644 --- a/compute/src/main/java/org/jclouds/compute/util/ConcurrentOpenSocketFinder.java +++ b/compute/src/main/java/org/jclouds/compute/util/ConcurrentOpenSocketFinder.java @@ -86,7 +86,7 @@ public class ConcurrentOpenSocketFinder implements OpenSocketFinder { public HostAndPort apply(String from) { return HostAndPort.fromParts(from, port); } - }).toImmutableSet(); + }).toSet(); // Specify a retry period of 1s, expressed in the same time units. long period = timeUnits.convert(1, TimeUnit.SECONDS); diff --git a/core/src/main/java/org/jclouds/collect/TransformingSetSupplier.java b/core/src/main/java/org/jclouds/collect/TransformingSetSupplier.java index e734b0b152..83e428e77e 100644 --- a/core/src/main/java/org/jclouds/collect/TransformingSetSupplier.java +++ b/core/src/main/java/org/jclouds/collect/TransformingSetSupplier.java @@ -49,7 +49,7 @@ public class TransformingSetSupplier implements Supplier> .filter(notNull()) .transform(converter) .filter(notNull()) - .toImmutableSet(); + .toSet(); } @Override diff --git a/core/src/main/java/org/jclouds/osgi/Bundles.java b/core/src/main/java/org/jclouds/osgi/Bundles.java index 0400df2eea..a37f8ec18c 100644 --- a/core/src/main/java/org/jclouds/osgi/Bundles.java +++ b/core/src/main/java/org/jclouds/osgi/Bundles.java @@ -58,7 +58,7 @@ public final class Bundles { .filter(Predicates.notNull()) .transform(instantiateIfPossible(type)) .filter(Predicates.notNull()) - .toImmutableSet(); + .toSet(); } /** diff --git a/core/src/test/java/org/jclouds/collect/AdvanceUntilEmptyIterableTest.java b/core/src/test/java/org/jclouds/collect/AdvanceUntilEmptyIterableTest.java index e3354fce81..00330b3d7d 100644 --- a/core/src/test/java/org/jclouds/collect/AdvanceUntilEmptyIterableTest.java +++ b/core/src/test/java/org/jclouds/collect/AdvanceUntilEmptyIterableTest.java @@ -70,7 +70,7 @@ public class AdvanceUntilEmptyIterableTest { AdvanceUntilEmptyIterable iterable = new AdvanceUntilEmptyIterable(nextIterable); - Assert.assertEquals(iterable.concat().toImmutableSet(), + Assert.assertEquals(iterable.concat().toSet(), ImmutableSet.of("foo", "bar", "boo", "baz", "ham", "cheeze")); EasyMock.verify(nextIterable); diff --git a/core/src/test/java/org/jclouds/collect/IterableWithMarkersTest.java b/core/src/test/java/org/jclouds/collect/IterableWithMarkersTest.java index e81bd2e3bf..4122ce6ace 100644 --- a/core/src/test/java/org/jclouds/collect/IterableWithMarkersTest.java +++ b/core/src/test/java/org/jclouds/collect/IterableWithMarkersTest.java @@ -18,7 +18,7 @@ public class IterableWithMarkersTest { public void testElementsEqual() { IterableWithMarker initial = IterableWithMarkers.from(ImmutableSet.of("foo", "bar")); - Assert.assertEquals(initial.toImmutableSet(), ImmutableSet.of("foo", "bar")); + Assert.assertEquals(initial.toSet(), ImmutableSet.of("foo", "bar")); Assert.assertEquals(initial.nextMarker(), Optional.absent()); } @@ -26,7 +26,7 @@ public class IterableWithMarkersTest { public void testMarkerEqual() { IterableWithMarker initial = IterableWithMarkers.from(ImmutableSet.of("foo", "bar"), "MARKER"); - Assert.assertEquals(initial.toImmutableSet(), ImmutableSet.of("foo", "bar")); + Assert.assertEquals(initial.toSet(), ImmutableSet.of("foo", "bar")); Assert.assertEquals(initial.nextMarker(), Optional.of("MARKER")); } } diff --git a/core/src/test/java/org/jclouds/collect/PagedIterablesTest.java b/core/src/test/java/org/jclouds/collect/PagedIterablesTest.java index 93c56dfda0..256c162d62 100644 --- a/core/src/test/java/org/jclouds/collect/PagedIterablesTest.java +++ b/core/src/test/java/org/jclouds/collect/PagedIterablesTest.java @@ -68,7 +68,7 @@ public class PagedIterablesTest { PagedIterable iterable = PagedIterables.advance(initial, markerToNext); - Assert.assertEquals(iterable.concat().toImmutableSet(), + Assert.assertEquals(iterable.concat().toSet(), ImmutableSet.of("foo", "bar", "boo", "baz", "ham", "cheeze")); EasyMock.verify(markerToNext); diff --git a/labs/elb/src/test/java/org/jclouds/elb/features/LoadBalancerApiExpectTest.java b/labs/elb/src/test/java/org/jclouds/elb/features/LoadBalancerApiExpectTest.java index 5d8369b689..f73401b1cb 100644 --- a/labs/elb/src/test/java/org/jclouds/elb/features/LoadBalancerApiExpectTest.java +++ b/labs/elb/src/test/java/org/jclouds/elb/features/LoadBalancerApiExpectTest.java @@ -144,7 +144,7 @@ public class LoadBalancerApiExpectTest extends BaseELBApiExpectTest { LoadBalancer lb1 = new GetLoadBalancerResponseTest().expected().toBuilder().name("my-load-balancer-1").build(); LoadBalancer lb2 = new GetLoadBalancerResponseTest().expected(); - assertEquals(apiWhenExist.getLoadBalancerApi().list().concat().toImmutableSet(), ImmutableSet.of(lb1, lb2)); + assertEquals(apiWhenExist.getLoadBalancerApi().list().concat().toSet(), ImmutableSet.of(lb1, lb2)); } public void testList2PagesWhenResponseIs2xxInEU() throws Exception { @@ -203,7 +203,7 @@ public class LoadBalancerApiExpectTest extends BaseELBApiExpectTest { ELBApi apiWhenDontExist = requestSendsResponse( list, listResponse); - assertEquals(apiWhenDontExist.getLoadBalancerApi().list().get(0).toImmutableSet(), ImmutableSet.of()); + assertEquals(apiWhenDontExist.getLoadBalancerApi().list().get(0).toSet(), ImmutableSet.of()); } diff --git a/labs/iam/src/test/java/org/jclouds/iam/features/UserApiExpectTest.java b/labs/iam/src/test/java/org/jclouds/iam/features/UserApiExpectTest.java index 110ddfd70f..5d7ac759a7 100644 --- a/labs/iam/src/test/java/org/jclouds/iam/features/UserApiExpectTest.java +++ b/labs/iam/src/test/java/org/jclouds/iam/features/UserApiExpectTest.java @@ -149,7 +149,7 @@ public class UserApiExpectTest extends BaseIAMApiExpectTest { IAMApi apiWhenExist = requestsSendResponses(list, listResponse, list2, list2Response); - assertEquals(apiWhenExist.getUserApi().list().concat().toImmutableList(), + assertEquals(apiWhenExist.getUserApi().list().concat().toList(), ImmutableList.copyOf(Iterables.concat(new ListUsersResponseTest().expected(), new ListUsersResponseTest().expected()))); } diff --git a/labs/openstack-glance/src/test/java/org/jclouds/openstack/glance/v1_0/features/ImageApiLiveTest.java b/labs/openstack-glance/src/test/java/org/jclouds/openstack/glance/v1_0/features/ImageApiLiveTest.java index 765cc52fc2..46e9a32ef9 100644 --- a/labs/openstack-glance/src/test/java/org/jclouds/openstack/glance/v1_0/features/ImageApiLiveTest.java +++ b/labs/openstack-glance/src/test/java/org/jclouds/openstack/glance/v1_0/features/ImageApiLiveTest.java @@ -49,7 +49,7 @@ public class ImageApiLiveTest extends BaseGlanceApiLiveTest { public void testList() throws Exception { for (String zoneId : glanceContext.getApi().getConfiguredZones()) { ImageApi api = glanceContext.getApi().getImageApiForZone(zoneId); - Set response = api.list().concat().toImmutableSet(); + Set response = api.list().concat().toSet(); assert null != response; for (Image image : response) { checkImage(image); @@ -67,7 +67,7 @@ public class ImageApiLiveTest extends BaseGlanceApiLiveTest { public void testListInDetail() throws Exception { for (String zoneId : glanceContext.getApi().getConfiguredZones()) { ImageApi api = glanceContext.getApi().getImageApiForZone(zoneId); - Set response = api.listInDetail().concat().toImmutableSet(); + Set response = api.listInDetail().concat().toSet(); assert null != response; for (ImageDetails image : response) { checkImage(image); diff --git a/labs/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/NetworkApiExpectTest.java b/labs/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/NetworkApiExpectTest.java index 16190fa39a..d118747ffb 100644 --- a/labs/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/NetworkApiExpectTest.java +++ b/labs/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/NetworkApiExpectTest.java @@ -55,7 +55,7 @@ public class NetworkApiExpectTest extends BaseQuantumApiExpectTest { HttpResponse.builder().statusCode(200).payload(payloadFromResourceWithContentType("/list_network_refs.json", APPLICATION_JSON)).build()) .getNetworkApiForZone("region-a.geo-1"); - Set nets = api.listReferences().toImmutableSet(); + Set nets = api.listReferences().toSet(); assertEquals(nets, listOfNetworkRefs()); } @@ -76,7 +76,7 @@ public class NetworkApiExpectTest extends BaseQuantumApiExpectTest { HttpResponse.builder().statusCode(200).payload(payloadFromResourceWithContentType("/list_networks.json", APPLICATION_JSON)).build()) .getNetworkApiForZone("region-a.geo-1"); - Set nets = api.list().toImmutableSet(); + Set nets = api.list().toSet(); assertEquals(nets, listOfNetworks()); } diff --git a/labs/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/NetworkApiLiveTest.java b/labs/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/NetworkApiLiveTest.java index 6f5cdb115b..7d6b6388fa 100644 --- a/labs/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/NetworkApiLiveTest.java +++ b/labs/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/NetworkApiLiveTest.java @@ -42,8 +42,8 @@ public class NetworkApiLiveTest extends BaseQuantumApiLiveTest { public void testListNetworks() { for (String zoneId : quantumContext.getApi().getConfiguredZones()) { - Set ids = quantumContext.getApi().getNetworkApiForZone(zoneId).listReferences().toImmutableSet(); - Set networks = quantumContext.getApi().getNetworkApiForZone(zoneId).list().toImmutableSet(); + Set ids = quantumContext.getApi().getNetworkApiForZone(zoneId).listReferences().toSet(); + Set networks = quantumContext.getApi().getNetworkApiForZone(zoneId).list().toSet(); assertNotNull(ids); assertEquals(ids.size(), networks.size()); for (Network network : networks) { diff --git a/labs/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/PortApiExpectTest.java b/labs/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/PortApiExpectTest.java index 47764d3fab..295757f209 100644 --- a/labs/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/PortApiExpectTest.java +++ b/labs/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/PortApiExpectTest.java @@ -56,7 +56,7 @@ public class PortApiExpectTest extends BaseQuantumApiExpectTest { HttpResponse.builder().statusCode(200).payload(payloadFromStringWithContentType("{\"ports\": [{\"id\": \"a6058a59-fa8c-46cc-bac8-08904e6ff0a5\"}]}", APPLICATION_JSON)).build()) .getPortApiForZoneAndNetwork("region-a.geo-1", "1a104cf5-cb18-4d35-9407-2fd2646d9d0b"); - Set nets = api.listReferences().toImmutableSet(); + Set nets = api.listReferences().toSet(); assertEquals(nets, ImmutableSet.of(Reference.builder().id("a6058a59-fa8c-46cc-bac8-08904e6ff0a5").build())); } @@ -77,7 +77,7 @@ public class PortApiExpectTest extends BaseQuantumApiExpectTest { HttpResponse.builder().statusCode(200).payload(payloadFromStringWithContentType("{\"ports\": [{\"state\": \"DOWN\", \"id\": \"814ae4bb-33d9-425f-8ee2-13a5c90b1465\"}]}", APPLICATION_JSON)).build()) .getPortApiForZoneAndNetwork("region-a.geo-1", "1a104cf5-cb18-4d35-9407-2fd2646d9d0b"); - Set nets = api.list().toImmutableSet(); + Set nets = api.list().toSet(); assertEquals(nets, ImmutableSet.of(Port.builder().state(Port.State.DOWN).id("814ae4bb-33d9-425f-8ee2-13a5c90b1465").build())); } diff --git a/labs/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/PortApiLiveTest.java b/labs/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/PortApiLiveTest.java index baf37ffcc8..671ccdcab5 100644 --- a/labs/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/PortApiLiveTest.java +++ b/labs/openstack-quantum/src/test/java/org/jclouds/openstack/quantum/v1_0/features/PortApiLiveTest.java @@ -46,11 +46,11 @@ public class PortApiLiveTest extends BaseQuantumApiLiveTest { public void testListPorts() { for (String zoneId : quantumContext.getApi().getConfiguredZones()) { NetworkApi netApi = quantumContext.getApi().getNetworkApiForZone(zoneId); - Set nets = netApi.listReferences().toImmutableSet(); + Set nets = netApi.listReferences().toSet(); for(Reference net : nets) { PortApi portApi = quantumContext.getApi().getPortApiForZoneAndNetwork(zoneId, net.getId()); - Set portRefs = portApi.listReferences().toImmutableSet(); - Set ports = portApi.list().toImmutableSet(); + Set portRefs = portApi.listReferences().toSet(); + Set ports = portApi.list().toSet(); assertEquals(portRefs.size(), ports.size()); for (Port port : ports) { diff --git a/labs/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ContainerApiExpectTest.java b/labs/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ContainerApiExpectTest.java index eec3a43d2e..a14c58d624 100644 --- a/labs/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ContainerApiExpectTest.java +++ b/labs/openstack-swift/src/test/java/org/jclouds/openstack/swift/v1/features/ContainerApiExpectTest.java @@ -68,7 +68,7 @@ public class ContainerApiExpectTest extends BaseSwiftApiExpectTest { SwiftApi apiWhenNoContainersExist = requestsSendResponses(keystoneAuthWithUsernameAndPassword, responseWithKeystoneAccess, list, listResponse); - assertEquals(apiWhenNoContainersExist.getContainerApiForRegion("region-a.geo-1").list().toImmutableSet(), + assertEquals(apiWhenNoContainersExist.getContainerApiForRegion("region-a.geo-1").list().toSet(), ImmutableSet.of()); } diff --git a/labs/rds/src/test/java/org/jclouds/rds/features/InstanceApiExpectTest.java b/labs/rds/src/test/java/org/jclouds/rds/features/InstanceApiExpectTest.java index ac1b081673..4642a6c2ba 100644 --- a/labs/rds/src/test/java/org/jclouds/rds/features/InstanceApiExpectTest.java +++ b/labs/rds/src/test/java/org/jclouds/rds/features/InstanceApiExpectTest.java @@ -141,7 +141,7 @@ public class InstanceApiExpectTest extends BaseRDSApiExpectTest { RDSApi apiWhenExist = requestsSendResponses( list, listResponse, list2, list2Response); - assertEquals(apiWhenExist.getInstanceApi().list().concat().toImmutableList(), + assertEquals(apiWhenExist.getInstanceApi().list().concat().toList(), ImmutableList.copyOf(Iterables.concat(new DescribeDBInstancesResponseTest().expected(), new DescribeDBInstancesResponseTest().expected()))); } diff --git a/labs/rds/src/test/java/org/jclouds/rds/features/SecurityGroupApiExpectTest.java b/labs/rds/src/test/java/org/jclouds/rds/features/SecurityGroupApiExpectTest.java index 6ff123677a..1e4d4c2efc 100644 --- a/labs/rds/src/test/java/org/jclouds/rds/features/SecurityGroupApiExpectTest.java +++ b/labs/rds/src/test/java/org/jclouds/rds/features/SecurityGroupApiExpectTest.java @@ -195,7 +195,7 @@ public class SecurityGroupApiExpectTest extends BaseRDSApiExpectTest { RDSApi apiWhenExist = requestsSendResponses( list, listResponse, list2, list2Response); - assertEquals(apiWhenExist.getSecurityGroupApi().list().concat().toImmutableList(), + assertEquals(apiWhenExist.getSecurityGroupApi().list().concat().toList(), ImmutableList.copyOf(Iterables.concat(new DescribeDBSecurityGroupsResponseTest().expected(), new DescribeDBSecurityGroupsResponseTest().expected()))); } diff --git a/labs/rds/src/test/java/org/jclouds/rds/features/SubnetGroupApiExpectTest.java b/labs/rds/src/test/java/org/jclouds/rds/features/SubnetGroupApiExpectTest.java index 8e0e1a2fe9..b4d7b43c4d 100644 --- a/labs/rds/src/test/java/org/jclouds/rds/features/SubnetGroupApiExpectTest.java +++ b/labs/rds/src/test/java/org/jclouds/rds/features/SubnetGroupApiExpectTest.java @@ -141,7 +141,7 @@ public class SubnetGroupApiExpectTest extends BaseRDSApiExpectTest { RDSApi apiWhenExist = requestsSendResponses( list, listResponse, list2, list2Response); - assertEquals(apiWhenExist.getSubnetGroupApi().list().concat().toImmutableList(), + assertEquals(apiWhenExist.getSubnetGroupApi().list().concat().toList(), ImmutableList.copyOf(Iterables.concat(new DescribeDBSubnetGroupsResponseTest().expected(), new DescribeDBSubnetGroupsResponseTest().expected()))); } diff --git a/providers/glesys/src/main/java/org/jclouds/glesys/compute/GleSYSComputeServiceAdapter.java b/providers/glesys/src/main/java/org/jclouds/glesys/compute/GleSYSComputeServiceAdapter.java index 96dd438545..e58258e18d 100644 --- a/providers/glesys/src/main/java/org/jclouds/glesys/compute/GleSYSComputeServiceAdapter.java +++ b/providers/glesys/src/main/java/org/jclouds/glesys/compute/GleSYSComputeServiceAdapter.java @@ -206,7 +206,7 @@ public class GleSYSComputeServiceAdapter implements ComputeServiceAdapter listImages() { - return api.getServerApi().listTemplates().toImmutableSet(); + return api.getServerApi().listTemplates().toSet(); } // cheat until we have a getTemplate command diff --git a/providers/glesys/src/test/java/org/jclouds/glesys/features/ArchiveApiExpectTest.java b/providers/glesys/src/test/java/org/jclouds/glesys/features/ArchiveApiExpectTest.java index f8a300965e..9c36c8fada 100644 --- a/providers/glesys/src/test/java/org/jclouds/glesys/features/ArchiveApiExpectTest.java +++ b/providers/glesys/src/test/java/org/jclouds/glesys/features/ArchiveApiExpectTest.java @@ -55,7 +55,7 @@ public class ArchiveApiExpectTest extends BaseGleSYSApiExpectTest { Set expected = ImmutableSet.of( Archive.builder().username("xxxxx_test1").freeSize("20 GB").totalSize("30 GB").locked(false).build()); - assertEquals(api.list().toImmutableSet(), expected); + assertEquals(api.list().toSet(), expected); } public void testListArchivesWhenResponseIs4xxReturnsEmpty() { diff --git a/providers/glesys/src/test/java/org/jclouds/glesys/features/EmailAccountApiExpectTest.java b/providers/glesys/src/test/java/org/jclouds/glesys/features/EmailAccountApiExpectTest.java index 30adf0dff8..2166bb7234 100644 --- a/providers/glesys/src/test/java/org/jclouds/glesys/features/EmailAccountApiExpectTest.java +++ b/providers/glesys/src/test/java/org/jclouds/glesys/features/EmailAccountApiExpectTest.java @@ -69,7 +69,7 @@ public class EmailAccountApiExpectTest extends BaseGleSYSApiExpectTest { .modified(dateService.iso8601SecondsDateParse("2012-06-24T11:53:48+02:00")).build() ); - Set actual = api.listDomain("cl13016.test.jclouds.org").toImmutableSet(); + Set actual = api.listDomain("cl13016.test.jclouds.org").toSet(); assertEquals(actual, expected); assertEquals(Iterables.get(actual, 0).toString(), Iterables.get(expected, 0).toString()); } diff --git a/providers/glesys/src/test/java/org/jclouds/glesys/features/IpApiExpectTest.java b/providers/glesys/src/test/java/org/jclouds/glesys/features/IpApiExpectTest.java index fc6a900ce4..ecfb17a05e 100644 --- a/providers/glesys/src/test/java/org/jclouds/glesys/features/IpApiExpectTest.java +++ b/providers/glesys/src/test/java/org/jclouds/glesys/features/IpApiExpectTest.java @@ -158,7 +158,7 @@ public class IpApiExpectTest extends BaseGleSYSApiExpectTest { HttpResponse.builder().statusCode(200).payload(payloadFromResource("/ip_list_free.json")).build()) .getIpApi(); - assertEquals(api.listFree(4, "Falkenberg", "OpenVZ").toImmutableSet(), ParseIpAddressFromResponseTest.EXPECTED_IPS); + assertEquals(api.listFree(4, "Falkenberg", "OpenVZ").toSet(), ParseIpAddressFromResponseTest.EXPECTED_IPS); } public void testListFreeWhenResponseIs404ReturnsEmptySet() { @@ -169,7 +169,7 @@ public class IpApiExpectTest extends BaseGleSYSApiExpectTest { HttpResponse.builder().statusCode(404).build()) .getIpApi(); - assertEquals(api.listFree(6, "Falkenberg", "OpenVZ").toImmutableSet(), ImmutableSet.of()); + assertEquals(api.listFree(6, "Falkenberg", "OpenVZ").toSet(), ImmutableSet.of()); } public void testAddWhenResponseIs2xx() { diff --git a/providers/glesys/src/test/java/org/jclouds/glesys/features/ServerApiExpectTest.java b/providers/glesys/src/test/java/org/jclouds/glesys/features/ServerApiExpectTest.java index ad218326bc..7d235dcee4 100644 --- a/providers/glesys/src/test/java/org/jclouds/glesys/features/ServerApiExpectTest.java +++ b/providers/glesys/src/test/java/org/jclouds/glesys/features/ServerApiExpectTest.java @@ -73,7 +73,7 @@ public class ServerApiExpectTest extends BaseGleSYSApiExpectTest { HttpResponse.builder().statusCode(204).payload(payloadFromResource("/server_list.json")).build()).getServerApi(); Server expected = Server.builder().id("vz1541880").hostname("mammamia").datacenter("Falkenberg").platform("OpenVZ").build(); - assertEquals(api.list().toImmutableSet(), ImmutableSet.of(expected)); + assertEquals(api.list().toSet(), ImmutableSet.of(expected)); } public void testListServersWhenReponseIs404IsEmpty() { @@ -162,7 +162,7 @@ public class ServerApiExpectTest extends BaseGleSYSApiExpectTest { expectedBuilder.add(OSTemplate.builder().name(name).minDiskSize(20).minMemSize(1024).os("windows").platform("Xen").build()); } - assertEquals(api.listTemplates().toImmutableSet(), expectedBuilder.build()); + assertEquals(api.listTemplates().toSet(), expectedBuilder.build()); } public void testGetServerDetailsWhenResponseIs2xx() throws Exception {