private static void assertPathParamsExist(Swagger swagger, String path, String... expectedPathParams) {
    List<Parameter> parameters = swagger.getPath(path).getGet().getParameters();
    assertNotNull("No path parameters for path: " + path, parameters);
    Set<String> pathParamNames = new HashSet<>();
    for (Parameter param: parameters) {
      if (param instanceof PathParameter) {
        pathParamNames.add(param.getName());
      }
    }
    Set<String> missingPathParams = Sets.difference(ImmutableSet.copyOf(expectedPathParams), pathParamNames);
    assertTrue("Expected path params for [" + path + "] are missing: " + missingPathParams, missingPathParams.isEmpty());
  }
Verify that the top level API's path parameters are transferred to the nested API.
ambari-utility/src/test/java/org/apache/ambari/swagger/AmbariSwaggerReaderTest.java