Java 27 and 26: runnable demos and captured output for every JEP, plus version lanes
Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01B38FGKKam5SCGgwgduVAh3
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import org.mockito.Mockito;
|
||||
|
||||
/**
|
||||
* Creates one mock and stubs one call: the smallest thing that makes Mockito ask ByteBuddy to read and write class files.
|
||||
* Run by scripts/upgrade.sh against two Mockito versions on JDK 21 and 25. Explained in docs/15-build-files.md.
|
||||
*/
|
||||
public class MockitoProbe {
|
||||
interface Greeter { String greet(String name); }
|
||||
|
||||
public static void main(String[] args) {
|
||||
Greeter g = Mockito.mock(Greeter.class);
|
||||
Mockito.when(g.greet("x")).thenReturn("hi");
|
||||
System.out.println("mock says " + g.greet("x"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user