ImmutableSearchResultBuilder implements SearchResultBuilder { @Override public SearchResultBuilder remove(final JsonValue value) { jsonArrayBuilder.remove(value); return this; } private  ImmutableSearchResultBuilder(final JsonArrayBuilder theJsonArrayBuilder); static SearchResultBuilder newInstance(); static SearchResultBuilder of(final SearchResult searchResult); @Override SearchResultBuilder nextPageOffset(@Nullable final Long nextPageOffset); @Override SearchResultBuilder cursor(@Nullable final String cursor); @Override SearchResultBuilder add(final JsonValue value, final JsonValue... furtherValues); @Override SearchResultBuilder addAll(final Iterable<? extends JsonValue> values); @Override SearchResultBuilder remove(final JsonValue value); @Override SearchResult build();  }
@Test(expected = NullPointerException.class) public void tryToRemoveNullItem() { underTest.remove(null); }