@Test
    void exactPathAndParameter() {
        final List<HttpMethod> methods =
                ImmutableList.of(HttpMethod.GET, HttpMethod.DELETE, HttpMethod.POST, HttpMethod.PUT);
        final AtomicInteger i = new AtomicInteger(0);
        final List<Route> routes =
                methods.stream()
                       .map(method -> Route.builder().path(i.incrementAndGet() % 2 == 0 ? "/foo" : "/{id}")
                                           .methods(method).build())
                       .collect(toImmutableList());
        final List<Router<Route>> routers =
                Routers.routers(routes, null, null, Function.identity(), REJECT, false);
        assertThat(routers.size()).isOne();

        methods.forEach(method -> {
            final RoutingContext ctx = mock(RoutingContext.class);
            when(ctx.method()).thenReturn(method);
            when(ctx.path()).thenReturn("/foo");
            when(ctx.query()).thenReturn(null);
            when(ctx.acceptTypes()).thenReturn(ImmutableList.of());
            when(ctx.contentType()).thenReturn(null);

            final Routed<Route> routed = routers.get(0).find(ctx);
            assertThat(routed.route().methods()).contains(method);
        });
    }
Should detect the duplicates even if the mappings are split into more than one router.
core/src/test/java/com/linecorp/armeria/server/RouterTest.java