> +
> .endpoint(URI.create("http://localhost/api/cloud/virtualmachines")) //
> + .addHeader("Authorization", basicAuth) //
> + .addHeader("Accept",
> normalize(VirtualMachinesWithNodeExtendedDto.MEDIA_TYPE)) //
> + .build(),
> + HttpResponse
> + .builder()
> + .statusCode(200)
> + .payload(
> +
> payloadFromResourceWithContentType("/payloads/all-vms.xml",
> +
> normalize(VirtualMachinesWithNodeExtendedDto.MEDIA_TYPE))) //
> + .build());
> +
> + VirtualMachinesWithNodeExtendedDto vms = api.listAllVirtualMachines();
> + assertEquals(vms.getCollection().size(), 1);
> + assertEquals(vms.getCollection().get(0).getId(), Integer.valueOf(1));
> + assertEquals(vms.getCollection().get(0).getName(), "VM");
The pattern apparently is [`assertEquals(expected,
actual)`](http://junit.sourceforge.net/javadoc/org/junit/Assert.html#assertEquals\(java.lang.Object,
java.lang.Object\)), i.e. the other way around. I only mention that because
the test failure message is confusing if you keep it this way - it would e.g.
say "expected 3 but got 1" when you really mean "expected 1 but got 3".
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/14/files#r5154722