> @@ -141,6 +141,19 @@ public void testNodeRunningReturnsTrueWhenRunning() { > Assert.assertTrue(nodeRunning.apply(reference)); > Assert.assertEquals(reference.get(), node); > } > + > + @Test > + public void testNodeSuspendedReturnsTrueWhenSuspended() { > + expect(node.getStatus()).andReturn(Status.SUSPENDED).atLeastOnce(); > + expect(node.getBackendStatus()).andReturn(null).atLeastOnce(); > + replay(node); > + replay(computeService); > + > + AtomicNodeSuspended nodeRunning = new > AtomicNodeSuspended(computeService); > + AtomicReference<NodeMetadata> reference = Atomics.newReference(node); > + Assert.assertTrue(nodeRunning.apply(reference)); > + Assert.assertEquals(reference.get(), node);
Please import `assertTrue` and `assertEquals` statically. Also, what is the latter assertion getting us? It seems to just be verifying that, if you create an AtomicReference that refers to x, then x will be returned if you get the reference? We don't need to be testing that in jclouds, I guess? --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/405/files#r13737168