Complete the code to create a dummy object for the Logger interface.
Logger dummyLogger = [1];In JUnit with Mockito, mock(Logger.class) creates a dummy object for the Logger interface.
Complete the code to create a dummy List object using Mockito.
List<String> dummyList = [1];Mockito's mock(List.class) creates a dummy List object for testing.
Fix the error in the dummy object creation for the Service interface.
Service dummyService = [1];Interfaces cannot be instantiated with new. Use Mockito's mock(Service.class) to create a dummy.
Fill both blanks to create a dummy object and verify it was used once.
Repository dummyRepo = [1]; verify(dummyRepo).[2]();
Create a dummy with mock(Repository.class) and verify the save() method was called.
Fill all three blanks to create a dummy object, stub a method, and assert the stubbed value.
Calculator dummyCalc = [1]; when(dummyCalc.[2](5, 3)).thenReturn([3]); assertEquals(8, dummyCalc.add(5, 3));
Create a dummy with mock(Calculator.class), stub the add method to return 8, and assert the result.