> +      MockWebServer server = mockEtcdJavaWebServer();
> +
> +      server.enqueue(new 
> MockResponse().setBody(payloadFromResource("/keys-create.json")).setResponseCode(201));
> +      EtcdApi etcdApi = api(server.getUrl("/"));
> +      KeysApi api = etcdApi.keysApi();
> +      try {
> +         Key createdKey = api.createKey("hello", "world");
> +         assertNotNull(createdKey);
> +         assertTrue(createdKey.node().key().equals("/hello"));
> +         assertTrue(createdKey.node().value().equals("world"));
> +         assertSent(server, "PUT", "/" + EtcdApiMetadata.API_VERSION + 
> "/keys/hello");
> +      } finally {
> +         etcdApi.close();
> +         server.shutdown();
> +      }
> +   }

Add the mock test for the create with TTL method.

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

Reply via email to