@Test
  public void testDuplicateRoleNames() {
    final String rolesProp = "A,A";

    Properties config = new Properties();
    config.setProperty(MCAST_PORT, "0");
    config.setProperty(LOCATORS, "");
    config.setProperty(ROLES, rolesProp);
    distributionProperties = config;

    InternalDistributedSystem system = getSystem();
    try {
      DistributionManager dm = system.getDistributionManager();
      InternalDistributedMember member = dm.getDistributionManagerId();

      Set roles = member.getRoles();
      assertEquals(1, roles.size());

      Role role = (Role) roles.iterator().next();
      assertEquals(true, role.isPresent());
      assertEquals(1, role.getCount());
    } finally {
      system.disconnect();
    }
  }
Tests that specifying duplicate role names results in just one Role.
geode-core/src/distributedTest/java/org/apache/geode/distributed/RoleDUnitTest.java