Add java8-to-25 module: legacy Java 8 app run on JDK 8, 17 and 25, tool coverage, JVM flags, libraries, OpenRewrite and the fixed version
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b6vDJ5fWY5uEZaJFNi
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
public class MockDemo {
|
||||
public static class PriceService {
|
||||
public int price() { return 100; }
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
PriceService s = mock(PriceService.class);
|
||||
when(s.price()).thenReturn(42);
|
||||
System.out.println("mocked price " + s.price());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user