> + */
> +@Test(groups = "live", testName = "ConsolesApiLiveTest")
> +public class ConsolesApiLiveTest extends BaseNovaApiLiveTest {
> +
> +    @Test
> +    public void testGetVNCConsole() {
> +        for (String zoneId : api.getConfiguredZones()) {
> +            Optional<? extends ConsolesApi> apiOption = 
> api.getConsolesExtensionForZone(zoneId);
> +            if (!apiOption.isPresent())
> +                continue;
> +
> +            ConsolesApi api = apiOption.get();
> +            ServerApi serverApi = this.api.getServerApiForZone(zoneId);
> +            Server server = createServerInZone(zoneId);
> +            Console console = api.getConsole(server.getId(), 
> Console.Type.NOVNC);
> +            assertNotNull(console);

The test two lines below will fail if `console` is `null`, so personally I'd 
say we could remove this. But fine to keep it in if you like the explicit 
non-null check.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/339/files#r13035082

Reply via email to