public static LocatorMXBean getLocatorMbeanProxy(DistributedMember member) {

    final SystemManagementService service =
        (SystemManagementService) ManagementTestBase.getManagementService();

    final ObjectName locatorMBeanName = service.getLocatorMBeanName(member);

    Wait.waitForCriterion(new WaitCriterion() {

      LocatorMXBean bean = null;

      @Override
      public String description() {
        return "Waiting for the proxy to get reflected at managing node";
      }

      @Override
      public boolean done() {
        GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
        bean = service.getMBeanProxy(locatorMBeanName, LocatorMXBean.class);
        boolean done = (bean != null);
        return done;
      }

    }, MAX_WAIT, 500, true);

    LocatorMXBean bean = null;
    try {
      bean = service.getMBeanProxy(locatorMBeanName, LocatorMXBean.class);
    } catch (ManagementException mgz) {
      if (bean == null) {
        InternalDistributedSystem.getLogger()
            .fine("Undesired Result :Locator MBean Proxy Should Not be Empty for : "
                + locatorMBeanName.getCanonicalName());
      }
    }

    return bean;
  }
Utility Method to obtain GatewayReceiverMXBean proxy reference for a member

@param member distributed member
@return a reference to GatewayReceiverMXBean
geode-dunit/src/main/java/org/apache/geode/management/MBeanUtil.java