@Test
public void returnsQueryForMatchesBetweenSpecifiedPageNumbers() throws JSONException {

    doReturn(true).when(user).isVerified();
    PaginatedSearchQueryBuilder queryBuilder = new PaginatedSearchQueryBuilder(applicationContext, "john doe foo");
    String actualQuery = queryBuilder.queryForMatchingChildrenBetweenPages(1, 10);
    String expectQuery = "SELECT child_json, synced " +
            "FROM children WHERE (child_json LIKE '%john%' OR id LIKE '%john%' " +
            "OR child_json LIKE '%doe%' OR id LIKE '%doe%' " +
            "OR child_json LIKE '%foo%' OR id LIKE '%foo%') LIMIT 9 OFFSET 10";
    assertEquals(expectQuery, actualQuery);
}