@Test
void buildPath() {

    var builder = new CodeBuilder();
    this.builder.buildPath(builder, "/test", Map.of());
    assertThat(builder.build()).isEqualToIgnoringWhitespace("String path = \"/test\";");
    builder = new CodeBuilder();
    this.builder.buildPath(builder, "/test/:id", Map.of("id", 0));
    assertThat(builder.build()).contains("builder.append(\"/test/\").append(core.framework.internal.web.service.PathParamHelper.toString(param0));");
    builder = new CodeBuilder();
    this.builder.buildPath(builder, "/:id/status", Map.of("id", 0));
    assertThat(builder.build())
            .contains("builder.append(\"/\").append(core.framework.internal.web.service.PathParamHelper.toString(param0));")
            .contains("builder.append(\"/status\");");
    builder = new CodeBuilder();
    this.builder.buildPath(builder, "/test/:key1/:key2", Map.of("key1", 0, "key2", 1));
    assertThat(builder.build())
            .contains("builder.append(\"/test/\").append(core.framework.internal.web.service.PathParamHelper.toString(param0));")
            .contains("builder.append(\"/\").append(core.framework.internal.web.service.PathParamHelper.toString(param1));");
    builder = new CodeBuilder();
    this.builder.buildPath(builder, "/test/:key1/:key2/", Map.of("key1", 0, "key2", 1));
    assertThat(builder.build())
            .contains("builder.append(\"/test/\").append(core.framework.internal.web.service.PathParamHelper.toString(param0));")
            .contains("builder.append(\"/\").append(core.framework.internal.web.service.PathParamHelper.toString(param1));")
            .contains("builder.append(\"/\");");
}