@Test
  public void swaggerConflictingNestedApis() {
    AmbariSwaggerReader asr = new AmbariSwaggerReader(null, createMock(Log.class));
    Set<Class<?>> classes = new LinkedHashSet<>(Arrays.asList(TopLevelAPI.class, AnotherTopLevelAPI.class,
            NestedAPI.class));
    Swagger swagger = asr.read(classes);
    assertEquals(
        ImmutableSet.of("/toplevel/top", "/toplevel/{param}/nested/list", "/toplevel2/anotherTop"),
        swagger.getPaths().keySet());
    assertPathParamsExist(swagger, "/toplevel/{param}/nested/list", "param");
  }
Test conflicting nested API's (the same API's are returned from different top level API's).
In this case the nested API should be associated to the first processed top level API.
ambari-utility/src/test/java/org/apache/ambari/swagger/AmbariSwaggerReaderTest.java