Select implements Consumer<RoboZonkyFilter> { public Select contains(final String field, final String value) { addObject(field, "contains", value); return this; }  static Select unrestricted(); Select contains(final String field, final String value); Select containsCaseInsensitive(final String field, final String value); Select startsWith(final String field, final String value); Select startsWithCaseInsensitive(final String field, final String value); Select endsWith(final String field, final String value); Select endsWithCaseInsensitive(final String field, final String value); Select in(final String field, final String... values); Select containsAll(final String field, final String... values); Select containsAny(final String field, final String... values); Select in(final String field, final long... values); Select containsAll(final String field, final long... values); Select containsAny(final String field, final long... values); Select equals(final String field, final Object value); Select equalsPlain(final String field, final Object value); Select notEquals(final String field, final Object value); Select greaterThan(final String field, final long value); Select greaterThan(final String field, final LocalDate value); Select greaterThan(final String field, final OffsetDateTime value); Select greaterThanOrEquals(final String field, final long value); Select greaterThanOrEquals(final String field, final LocalDate value); Select greaterThanOrEquals(final String field, final OffsetDateTime value); Select greaterThanOrNull(final String field, final LocalDate value); Select greaterThanOrNull(final String field, final OffsetDateTime value); Select greaterThanOrNull(final String field, final long value); Select lessThan(final String field, final long value); Select lessThan(final String field, final LocalDate value); Select lessThan(final String field, final OffsetDateTime value); Select lessThanOrEquals(final String field, final long value); Select lessThanOrEquals(final String field, final LocalDate value); Select lessThanOrEquals(final String field, final OffsetDateTime value); Select lessThanOrNull(final String field, final LocalDate value); Select lessThanOrNull(final String field, final OffsetDateTime value); Select lessThanOrNull(final String field, final long value); @Override void accept(final RoboZonkyFilter roboZonkyFilter); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }
@Test void contains() { final String fieldName = "field"; final String value = "value"; final Select select = new Select().contains(fieldName, value); final RoboZonkyFilter filter = mock(RoboZonkyFilter.class); select.accept(filter); verify(filter).setQueryParam(eq(fieldName + "__contains"), eq(value)); }