@Test(expected=AclException.class)
public void testMergeAclEntriesDuplicateEntries() throws AclException {

  List<AclEntry> existing = new ImmutableList.Builder<AclEntry>()
    .add(aclEntry(ACCESS, USER, ALL))
    .add(aclEntry(ACCESS, GROUP, READ))
    .add(aclEntry(ACCESS, OTHER, NONE))
    .build();
  List<AclEntry> aclSpec = Lists.newArrayList(
    aclEntry(ACCESS, USER, "bruce", ALL),
    aclEntry(ACCESS, USER, "diana", READ_WRITE),
    aclEntry(ACCESS, USER, "clark", READ),
    aclEntry(ACCESS, USER, "bruce", READ_EXECUTE));
  mergeAclEntries(existing, aclSpec);
}