PresenceFilter implements Filter { @Override public DEREncoder getEncoder() { return new OctetStringType(new ContextDERTag(Type.PRESENCE.ordinal(), false), attributeDesc); } PresenceFilter(final String name); String getAttributeDesc(); @Override DEREncoder getEncoder(); @Override boolean equals(final Object o); @Override int hashCode();  }
@Test(dataProvider = "encoded") public void encode(final PresenceFilter filter, final byte[] berValue) throws Exception { Assert.assertEquals(filter.getEncoder().encode(), berValue); }