> +
> .endpoint("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/"
> + + "servers/" + serverId + "/action")
> + .build();
> +
> + HttpResponse getConsoleResponse =
> HttpResponse.builder().statusCode(200)
> + .message("HTTP/1.1 200 OK")
> + .payload(payloadFromResourceWithContentType("/spice_console.json",
> + "application/json; charset=UTF-8")).build();
> +
> + NovaApi api =
> requestsSendResponses(keystoneAuthWithUsernameAndPasswordAndTenantName,
> + responseWithKeystoneAccess, extensionsOfNovaRequest,
> extensionsOfNovaResponse,
> + getConsole, getConsoleResponse);
> +
> + assertEquals(api.getConsolesExtensionForZone("az-1.region-a.geo-1")
> + .get().getConsole(serverId, Console.Type.SPICE_HTML5).toString(),
> + new ParseSPICEConsoleTest().expected().toString());
If we remove the toString() nothing would happen. We compare two identical
instances of Console class, so if `Console.equals()` is implemented correctly
it should return the same result.
Personally I would prefer removing toString(), because then the test would also
fail if `Console.equals()` method is not implemented correctly
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/339/files#r13062822