harbor run -t openthoughts/tasktrove-exp-rpt-stack-junit-v6-stack-junit-3630harbor download openthoughts/tasktrove-exp-rpt-stack-junit-v6-stack-junit-3630Implement Java sources under /app/ so that the JUnit test file at /tests/TestSolution.java compiles and passes. The test is in package org.eclipse.jetty.util — your sources must be reachable via the same package layout (e.g. /app/<package>/<Class>.java).
tests/TestSolution.java)Below is a deterministic summary of what the JUnit test file expects. Use this as the source of truth for package, imports, and public API. If the original task description above conflicts with this section, prefer this section.
Language: Java
Test package: org.eclipse.jetty.util
Test class: URIUtilTest
Well-known imports (JUnit, JDK, common libs — already on the classpath):
java.nio.charset.StandardCharsetsorg.junit.TestStatic imports (constants/methods referenced statically):
import static org.junit.Assert.assertEquals;import static org.junit.Assert.assertFalse;import static org.junit.Assert.assertTrue;Symbols the test references that you likely need to define (class/enum/interface names not coming from JDK or JUnit):
ISO_8859_1StringBuilder — constructed via new StringBuilder(...) with arities: 0 argsURIUtilMethods the test invokes on instances (you must expose at least these with the indicated arity; return type inferred from how the test uses the result):
.addEncodedPaths(...) — called with: 2 args.addPaths(...) — called with: 2 args.canonicalPath(...) — called with: 1 arg.compactPath(...) — called with: 1 arg.decodePath(...) — called with: 1 arg, 3 args.encodePath(...) — called with: 1 arg, 2 args.encodeString(...) — called with: 3 args.equalsIgnoreEncodings(...) — called with: 2 args.setLength(...) — called with: 1 argtests/TestSolution.java against JUnit's standalone console (/junit/junit-platform-console-standalone.jar) — both JUnit 4 (org.junit.*) and JUnit Jupiter (org.junit.jupiter.api.*) APIs are available.pom.xml exists in /app, the grader runs mvn test instead. Otherwise it runs javac over every .java file under /app plus tests/TestSolution.java, then executes JUnit Console with --scan-class-path./app/ in directories that match the package declaration. For example, a class in package com.foo.bar; must live at /app/com/foo/bar/<ClassName>.java (or under a Maven layout like /app/src/main/java/com/foo/bar/).imports_project, wildcard-imported packages, and the test's own package) must resolve to source files you create.Task: Implement a complete URI utility class to satisfy the URIUtilTest unit tests.
What to implement
Create a new class URIUtil in package org.eclipse.jetty.util with static utility methods that the tests exercise:
Place the implementation under /app/ so the class is at /app/org/eclipse/jetty/util/URIUtil.java (or equivalent path matching the package).
Behavior details the implementation must match (derived from the test expectations)
encodePath:
encodeString:
Guidance/examples to satisfy tests:
Guidance/examples to satisfy tests:
[... description truncated to fit prompt budget ...]