Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YPgGH6aMbSLANL3E2HHmS6
16 lines
564 B
Java
16 lines
564 B
Java
import org.junit.jupiter.api.MethodOrderer;
|
|
import org.junit.jupiter.api.Test;
|
|
import org.junit.jupiter.api.TestMethodOrder;
|
|
import org.junit.platform.commons.support.ReflectionSupport;
|
|
|
|
/** The replacements for OldApis. This compiles on 5.14.4 and on 6.1.3, so make these changes before you upgrade. */
|
|
@TestMethodOrder(MethodOrderer.MethodName.class)
|
|
class FixedApis {
|
|
|
|
@Test
|
|
void usesTheReplacements() {
|
|
Object loaded = ReflectionSupport.tryToLoadClass("java.lang.String").toOptional().orElseThrow();
|
|
System.out.println(loaded);
|
|
}
|
|
}
|