> + pbApi.close();
> + server.shutdown();
> + }
> + }
> +
> + @Test
> + public void testGetNonExistingContainer() throws Exception {
> + MockWebServer server = mockWebServer();
> + server.enqueue(new
> MockResponse().setResponseCode(500).setBody(payloadFromResource("/fault-404.xml")));
> +
> + ProfitBricksApi pbApi = api(server.getUrl(rootUrl));
> + DataCenterApi api = pbApi.dataCenterApi();
> +
> + String id = "random-non-existing-id";
> + try {
> + DataCenter dataCenter = api.getDataCenter(id);
Fail the test here, otherwise the test will succeed even if the exception is
not thrown.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/72/files#r22460274