> @@ -46,6 +46,60 @@ public ChefApiExpectTest() {
>       provider = "chef";
>     }
>  
> +   public void testListClientsReturns2xx() {
> +      ChefApi api = requestSendsResponse(
> +            signed(HttpRequest.builder() //
> +                  .method("GET") //
> +                  .endpoint("http://localhost:4000/clients";) //
> +                  .addHeader("X-Chef-Version", ChefApi.VERSION) //
> +                  .addHeader("Accept", MediaType.APPLICATION_JSON).build()), 
> //
> +            HttpResponse.builder().statusCode(200)
> +                  
> .payload(payloadFromResourceWithContentType("/clients_list.json", 
> MediaType.APPLICATION_JSON)) //
> +                  .build());
> +      Set<String> nodes = api.listClients();
> +      assertEquals(nodes.size(), 3);
> +      assertTrue(nodes.contains("adam"));

Add a message? E.g.
```
assertTrue(nodes.contains("adam"), "Expected nodes to contain 'adam' but was: 
%", nodes);
```

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

Reply via email to