@VisibleForTesting
  static String addRoutingPolicyInErrMsg(String errorMessage, String realtimeRoutingPolicy,
      String offlineRoutingPolicy) {
    if (realtimeRoutingPolicy != null && offlineRoutingPolicy != null) {
      return errorMessage + ", with routing policy: " + realtimeRoutingPolicy + " [realtime], " + offlineRoutingPolicy
          + " [offline]";
    }
    if (realtimeRoutingPolicy != null) {
      return errorMessage + ", with routing policy: " + realtimeRoutingPolicy + " [realtime]";
    }
    if (offlineRoutingPolicy != null) {
      return errorMessage + ", with routing policy: " + offlineRoutingPolicy + " [offline]";
    }
    return errorMessage;
  }
@Test
  public void testAddRoutingPolicyInErrMsg() {
    Assert.assertEquals(BaseSingleStageBrokerRequestHandler.addRoutingPolicyInErrMsg("error1", null, null), "error1");
    Assert.assertEquals(BaseSingleStageBrokerRequestHandler.addRoutingPolicyInErrMsg("error1", "rt_rp", null),
        "error1, with routing policy: rt_rp [realtime]");
    Assert.assertEquals(BaseSingleStageBrokerRequestHandler.addRoutingPolicyInErrMsg("error1", null, "off_rp"),
        "error1, with routing policy: off_rp [offline]");
    Assert.assertEquals(BaseSingleStageBrokerRequestHandler.addRoutingPolicyInErrMsg("error1", "rt_rp", "off_rp"),
        "error1, with routing policy: rt_rp [realtime], off_rp [offline]");
  }