> + */
> +@Test(groups = "unit", testName = "KeysApiMockTest")
> +public class KeysApiMockTest extends BaseEtcdMockTest {
> +
> +   public void testCreateKey() throws Exception {
> +      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");

There are no form parameters being sent it's all on the request path:

https://github.com/coreos/etcd/blob/master/Documentation/api.md#setting-the-value-of-a-key

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

Reply via email to