public void connect(int port, String username, String password) throws Exception {
    Map<String, String[]> env = new HashMap<>();
    env.put(JMXConnector.CREDENTIALS, new String[] {username, password});
    connect(null, port, env);
  }
Rule constructor

@param portSupplier The JMX server port to connect to
geode-dunit/src/main/java/org/apache/geode/test/junit/rules/MBeanServerConnectionRule.java