Complete the code to create a mock object using Mockito.
MyService service = Mockito.[1](MyService.class);
Mockito.mock() creates a mock object of the given class.
Complete the code to stub the method 'getData' to return 'Hello' when called.
Mockito.when(service.[1]()).thenReturn("Hello");
The method 'getData' is stubbed to return 'Hello' when called.
Fix the error in verifying that 'process' method was called once on the mock.
Mockito.verify(service, Mockito.[1]()).process();Mockito.times(1) verifies the method was called exactly once.
Fill both blanks to stub 'calculate' method to return 10 when called with argument 5.
Mockito.when(service.[1]([2])).thenReturn(10);
The method 'calculate' is stubbed to return 10 when called with argument 5.
Fill all three blanks to verify 'update' method was called twice with argument 'data'.
Mockito.verify(service, Mockito.[1]([2])).[3]("data");
Mockito.verify with times(2) checks 'update' was called twice with argument 'data'.
