private List<Entry> getSampleEntryList(GroupMemberAttrDetector.GroupMemberAttr member, int count) {
    List<Entry> entryList = Lists.newArrayList();
    for (int i = 0; i < count; i++) {
      Entry entry = new DefaultEntry();
      try {
        entry.setDn("dn=" + member.name() + "-" + i);
        entry.add(new DefaultAttribute(member.attrName(), new Value("xxx")));
        entryList.add(entry);
      } catch (Exception e) {
        LOG.error(e.getMessage());
      }
    }
    return entryList;
  }
Test suite for the attribute detector implementation
ambari-server/src/test/java/org/apache/ambari/server/ldap/service/ads/detectors/GroupMemberAttrDetectorTest.java