I found the answer for the same. If you follow the steps given below properly, you can mock the objects.
Step 1. - Add annotation to prepare the test class.
@PrepareForTest({ ServiceInvoker.class, ClassNeedToTest.class})
Step 2. - Mock the class.
serviceInvokerMck = Mockito.mock(ServiceInvoker.class);
Step 3. Use the below method to mock the object when new operator is called
PowerMockito.whenNew(ServiceInvoker.class).withAnyArguments().thenReturn(serviceInvokerMck);
What I was not doing was adding the class ClassNeedToTest
in PrepareForTest
annotation thinking that the only class need to be mocked should be added there.