Sure @Kentzo. As Zack says, Trove does not use mockwebserver; it uses the 
jclouds mock. If you take a look at the 
[DatabaseApiExpectTest](https://github.com/jclouds/jclouds-labs-openstack/blob/master/openstack-trove/src/test/java/org/jclouds/openstack/trove/v1/features/DatabaseApiExpectTest.java)
 class, for example,you'll see that the api to test is generated by calling the 
`requestsSendResponses` method. That method returns a mocked API that just 
returns the configured responses when the configured requests are made 
(otherwise ti fails).

The basic idea behind expect tests is to create a mock for each test/request to 
be tested, and then invoke the API method. If the request is properly 
generated, the mock will find and return the configured response for it. Then 
the test can assert the returned result. The first part, the request matching, 
is performed by the mock and helps us verify that the generated request is the 
expected one. The second part, manually checking the returned value, tests that 
the deserialization and response parsing is also working.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/12#issuecomment-21373735

Reply via email to