MatchedValuesRequestControl extends AbstractControl implements RequestControl { @Override public byte[] encode() { final ConstructedDEREncoder se = new ConstructedDEREncoder( UniversalDERTag.SEQ, Stream.of(matchedValuesFilters).map(Filter::getEncoder).toArray(DEREncoder[]::new)); return se.encode(); } MatchedValuesRequestControl();  MatchedValuesRequestControl(final String... filters);  MatchedValuesRequestControl(final String[] filters, final boolean critical);  MatchedValuesRequestControl(final Filter... filters);  MatchedValuesRequestControl(final Filter[] filters, final boolean critical); @Override boolean hasValue(); Filter[] getMatchedValuesFilters(); void setMatchedValuesFilters(final String... filters); void setMatchedValuesFilters(final Filter... filters); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); @Override byte[] encode(); static final String OID; }
@Test(groups = "control", dataProvider = "request") public void encode(final byte[] berValue, final MatchedValuesRequestControl expected) throws Exception { Assert.assertEquals(expected.encode(), berValue); }