public String getServicePath(String appName) throws IOException {
    String url = getRMWebAddress();
    StringBuilder api = new StringBuilder();
    api.append(url)
        .append("/app/v1/services");
    if (appName != null) {
      api.append("/")
          .append(appName);
    }
    appendUserNameIfRequired(api);
    return api.toString();
  }
@Test
  void testNoneSecureApiClient() throws IOException {
    String url = asc.getServicePath("/foobar");
    assertTrue(url.contains("user.name"),
        "User.name flag is missing in service path.");
    assertTrue(url.contains(System.getProperty("user.name")),
        "User.name flag is not matching JVM user.");
  }