@Test
public void newSearchResultFromJson() {

    final JsonArray itemsArray = JsonFactory.newArrayBuilder() //
            .add(1, 2, 3) //
            .build();
    final long nextPageOffset = 10L;
    final String jsonStr = "{\"items\":" + itemsArray.toString() + ",\"nextPageOffset\":" + nextPageOffset + "}";
    final JsonObject jsonObject = JsonFactory.newObject(jsonStr);
    final SearchResult searchResult = SearchModelFactory.newSearchResult(jsonObject);
    assertThat(searchResult) //
            .containsExactlyElementsOf(itemsArray) //
            .hasNextPageOffset(nextPageOffset);
}