So I am using only powerMockRunner in my service to write UT. I have created mock of my class like below
mockStatic(MyUtilities.class);
Also I have used this class in @PrepareForTest like below
@PrepareForTest({MyUtilities.class})
And also used when statement for the same to create a mock of method that is called from my target method like below
when(MyUtilities.getUserAccessableWorkspacesIds(111,0, "SessionID")).thenReturn((new ArrayList<>()));
Now the issue is I am getting error of below
java.lang.IllegalStateException: Failed to transform class with name com.src.common.utils.MyUtilities. Reason: cannot find com.src.file.domain.FileInfo
MyUtilities is presend in another service inside which I have a call for com.src.file.domain.FileInfo(which is in third service). Please suggest how can I fix this issue .