@Test
public void removeAttribute()
{

  final LdapAttribute attr1 = new LdapAttribute("givenName", "John");
  final LdapAttribute attr2 = new LdapAttribute("sn", "Doe");
  final Set<LdapAttribute> s = new HashSet<>();
  s.add(attr1);
  final LdapEntry le = LdapEntry.builder().dn("uid=1").attributes(s).build();
  le.addAttributes(attr2);
  le.removeAttribute("GIVENNAME");
  Assert.assertEquals(le.size(), 1);
  le.clear();
  Assert.assertEquals(le.size(), 0);
}