> +
> +      try {
> +         api.removeNetwork(networkId);
> +         assertSent(server, "DELETE", "/networks/" + networkId);
> +
> +      } finally {
> +         server.shutdown();
> +      }
> +   }
> +
> +   public void testConnectContainerToNetwork() throws Exception {
> +      MockWebServer server = mockWebServer(new 
> MockResponse().setResponseCode(200));
> +      NetworkApi api = api(DockerApi.class, 
> server.getUrl("/").toString()).getNetworkApi();
> +      try {
> +         api.connectContainerToNetwork("1", "containerName");
> +         assertSent(server, "POST", "/networks/1/connect");

What I mean, is that the call generates a body; not only a requestLine. The 
assertSent should also verify that it is sending the right payload. Take as an 
example the [GCE mock 
tests](https://github.com/jclouds/jclouds/blob/master/providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/InstanceApiMockTest.java#L85-L117).
This should be applied to all mock test classes, but let's fix just the network 
mock in this PR.

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

Reply via email to