@Test public void return_all_docIds_in_db() { when(httpClient.get("/test_db/_all_docs")) .thenReturn( HttpResponseStub.valueOf( 200, "{\"total_rows\": 3, \"offset\": 0, \"rows\": [" + "{\"id\": \"doc1\", \"key\": \"doc1\", \"value\": {\"rev\": \"4324BB\"}}," + "{\"id\": \"doc2\", \"key\": \"doc2\", \"value\": {\"rev\":\"2441HF\"}}," + "{\"id\": \"doc3\", \"key\": \"doc3\", \"value\": {\"rev\":\"74EC24\"}}]}")); List<String> all = dbCon.getAllDocIds(); assertEquals(3, all.size()); assertEquals("doc1", all.get(0)); assertEquals("doc2", all.get(1)); assertEquals("doc3", all.get(2)); }