Search in sources :

Example 6 with Response

use of org.lightcouch.Response in project camel by apache.

the class CouchDbConsumerUpdatesIntegrationTest method testDeletesOnly.

@Test
public void testDeletesOnly() throws InterruptedException {
    to.expectedHeaderReceived(CouchDbConstants.HEADER_METHOD, "UPDATE");
    to.expectedMessageCount(1);
    JsonElement obj = new Gson().toJsonTree("{ \"randomString\" : \"" + UUID.randomUUID() + "\" }");
    Response resp = client.save(obj);
    client.remove(resp.getId(), resp.getRev());
    to.assertIsSatisfied();
}
Also used : Response(org.lightcouch.Response) JsonElement(com.google.gson.JsonElement) Gson(com.google.gson.Gson) Test(org.junit.Test)

Aggregations

Response (org.lightcouch.Response)6 JsonElement (com.google.gson.JsonElement)5 Test (org.junit.Test)4 Gson (com.google.gson.Gson)3 JsonObject (com.google.gson.JsonObject)2 InvocationOnMock (org.mockito.invocation.InvocationOnMock)1