@Test
public void testTaskFailsIfUserSaysNo() throws Throwable {

  when(myChecker.getInstalledIotLauncherApps(myEmbeddedDevice)).thenReturn(Collections.singleton(OTHER_PACKAGE_NAME));
  // Answer "No" to "Do you want to uninstall packages?"
  when(myPrompt.showQuestionPrompt(Mockito.anyString())).thenReturn(false);
  UninstallIotLauncherAppsTask task = new UninstallIotLauncherAppsTask(PACKAGE_NAME, myChecker, myPrompt);
  assertFalse(task.run(myExecutor, myEmbeddedDevice, myLaunchStatus, myPrinter).getSuccess());
}