ImmutableSearchResult implements SearchResult { public static SearchResult empty() { return of(JsonFactory.newArray(), NO_NEXT_PAGE, null); } private  ImmutableSearchResult(final JsonArray items, @Nullable final Long nextPageOffset,
            @Nullable final String cursor); static SearchResult empty(); static ImmutableSearchResult of(final JsonArray items,
            @Nullable final Long nextPageOffset,
            @Nullable final String cursor); static ImmutableSearchResult fromJson(final JsonObject jsonObject); @Override JsonArray getItems(); @Override Optional<Long> getNextPageOffset(); @Override Optional<String> getCursor(); @Override boolean hasNextPage(); @Override int getSize(); @Override boolean isEmpty(); @Override Stream<JsonValue> stream(); @Override Iterator<JsonValue> iterator(); @Override JsonObject toJson(final JsonSchemaVersion schemaVersion, final Predicate<JsonField> thePredicate); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }
@Test public void emptyToJsonWithAllFieldTypes() { final SearchResult searchResult = ImmutableSearchResult.empty(); final String jsonStr = searchResult.toJsonString(FieldType.regularOrSpecial()); assertThat(jsonStr).isEqualTo("{\"__schemaVersion\":" + 2 + ",\"items\":[],\"nextPageOffset\":-1}"); }