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 7e59eea5cf..6c3f325676 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 @@ -69,10 +69,10 @@ public class ImageApiLiveTest extends BaseNovaApiLiveTest { assertTrue(image.getMinRam() > 0); assertTrue(image.getProgress() >= 0 && image.getProgress() <= 100); assertNotNull(image.getStatus()); - assertNotNull(image.getServer()); - assertNotNull(image.getTenantId()); - assertNotNull(image.getUpdated()); - assertNotNull(image.getUserId()); + // image.getServer() can be null + // image.getTenantId() can be null + // image.getUpdated() can be null + // image.getUserId() can be null } } } diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/features/ServerApiLiveTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/features/ServerApiLiveTest.java index 6d47cd88e1..e02dc437c1 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/features/ServerApiLiveTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/features/ServerApiLiveTest.java @@ -19,9 +19,9 @@ package org.jclouds.openstack.nova.v2_0.features; import static org.testng.Assert.assertEquals; -import static org.testng.Assert.*; - -import java.util.Set; +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertTrue; import org.jclouds.openstack.nova.v2_0.domain.Server; import org.jclouds.openstack.nova.v2_0.internal.BaseNovaApiLiveTest; @@ -44,12 +44,7 @@ public class ServerApiLiveTest extends BaseNovaApiLiveTest { public void testListServers() throws Exception { for (String zoneId : zones) { ServerApi api = novaContext.getApi().getServerApiForZone(zoneId); - Set response = api.list().concat().toImmutableSet(); - assertNotNull(response); - assertFalse(response.isEmpty()); - assert null != response; - assertTrue(response.size() >= 0); - for (Resource server : response) { + for (Resource server : api.list().concat()) { checkResource(server); } } @@ -59,10 +54,7 @@ public class ServerApiLiveTest extends BaseNovaApiLiveTest { public void testListServersInDetail() throws Exception { for (String zoneId : zones) { ServerApi api = novaContext.getApi().getServerApiForZone(zoneId); - Set response = api.listInDetail().concat().toImmutableSet(); - assertNotNull(response); - assertFalse(response.isEmpty()); - for (Server server : response) { + for (Server server : api.listInDetail().concat()) { checkServer(server); } } @@ -72,8 +64,7 @@ public class ServerApiLiveTest extends BaseNovaApiLiveTest { public void testGetServerById() throws Exception { for (String zoneId : zones) { ServerApi api = novaContext.getApi().getServerApiForZone(zoneId); - Set response = api.list().concat().toImmutableSet(); - for (Resource server : response) { + for (Resource server : api.list().concat()) { Server details = api.get(server.getId()); assertEquals(details.getId(), server.getId()); assertEquals(details.getName(), server.getName());