filter = new Filter(Filter.APPROX_MATCH_FILTER);
filter.setValue(new AttributeTypeAndValuePair("cn", "test"));
ASN1TestUtils.checkEncode(filter, LdapASN1Constant.Filter);
filter = new Filter(Filter.EXTENSIBLE_MATCH_FILTER);
MatchingRuleAssertion value = new MatchingRuleAssertion();
value.setDnAttributes(true);
assertTrue(value.isDnAttributes());
value.setMatchingRule("equal");
assertEquals("equal", value.getMatchingRule());
value.setMatchValue("cn");
assertEquals("cn", value.getMatchValue());
value.setType("type");
assertEquals("type", value.getType());
filter.setValue(value);
ASN1TestUtils.checkEncode(filter, LdapASN1Constant.Filter);
// composite filter