Fixes mock usage error

Bug: 253507223
Test: this is the test
Change-Id: I1ef517660511aa52cf0721a90af5c4f8b9e7edb6
This commit is contained in:
Chris Poultney
2023-01-28 21:03:58 +00:00
parent 3cbe552c39
commit 4132d0ca79

View File

@@ -201,7 +201,7 @@ public class WallpaperManagerServiceTests {
public void setUp() {
MockitoAnnotations.initMocks(this);
ExtendedMockito.doAnswer(invocation -> {
ExtendedMockito.doAnswer(invocation -> {
int userId = (invocation.getArgument(0));
return getWallpaperTestDir(userId);
}).when(() -> WallpaperUtils.getWallpaperDir(anyInt()));
@@ -315,7 +315,8 @@ public class WallpaperManagerServiceTests {
spyOn(mService.mWallpaperDisplayHelper);
doReturn(true).when(mService.mWallpaperDisplayHelper)
.isUsableDisplay(any(Display.class), mService.mLastWallpaper.connection.mClientUid);
.isUsableDisplay(any(Display.class),
eq(mService.mLastWallpaper.connection.mClientUid));
mService.mLastWallpaper.connection.attachEngine(mock(IWallpaperEngine.class),
DEFAULT_DISPLAY);