@Test
public void fromJson() {

    final String itemsArray = "[1,2,3]";
    final long nextPageOffset = 10L;
    final String jsonStr = "{\"items\":" + itemsArray + ",\"nextPageOffset\":" + nextPageOffset + "}";
    final JsonObject jsonObject = JsonFactory.newObject(jsonStr);
    final SearchResult searchResult = ImmutableSearchResult.fromJson(jsonObject);
    assertThat(searchResult.getItems()).isEqualTo(JsonFactory.newArray(itemsArray));
    assertThat(searchResult.getNextPageOffset()).contains(nextPageOffset);
}