private void populatePorts(List<Port> ports) {
    boolean plainTextPortFound = false;
    for (Port port : ports) {
      if (port.getPortType() == PortType.PLAINTEXT) {
        plainTextPortFound = true;
        this.portNum = port.getPort();
      }
      this.ports.put(port.getPortType(), port);
    }
    if (!plainTextPortFound) {
      throw new IllegalArgumentException("No Plain Text port found");
    }
  }
Create a {@link MockDataNodeId} object from given {@code ports}, {@code mountPaths}, {@code dataCenter}.
@param ports Ports associated with server on node.
@param mountPaths Mount paths for replicas on node.
@param dataCenter Name of datacenter.
ambry-test-utils/src/main/java/com/github/ambry/clustermap/MockDataNodeId.java