private static String generateDummyMastersList(int size) {
    List<String> masters = new ArrayList<>();
    for (int i = 0; i < size; i++) {
      masters.add(" localhost" + (i % 2 == 0 ? ":" + (1000 + i) : ""));
    }
    return String.join(",", masters);
  }
Generates a string of dummy master addresses in host:port format. Every other hostname won't
have a port number.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMasterRegistry.java