@Test
public void testIgnored() {

    insertApp("not installed", "not installed");
    insertAndInstallApp("installed, only one version available", 1, 1, false, 0);
    insertAndInstallApp("installed, already latest, no ignore", 10, 10, false, 0);
    insertAndInstallApp("installed, already latest, ignore all", 10, 10, true, 0);
    insertAndInstallApp("installed, already latest, ignore latest", 10, 10, false, 10);
    insertAndInstallApp("installed, already latest, ignore old", 10, 10, false, 5);
    insertAndInstallApp("installed, old version, no ignore", 5, 10, false, 0);
    insertAndInstallApp("installed, old version, ignore all", 5, 10, true, 0);
    insertAndInstallApp("installed, old version, ignore latest", 5, 10, false, 10);
    insertAndInstallApp("installed, old version, ignore newer, but not latest", 5, 10, false, 8);
    assertResultCount(contentResolver, 10, AppProvider.getContentUri(), PROJ);
    String[] projection = {Cols.Package.PACKAGE_NAME};
    List<App> canUpdateApps = AppProvider.Helper.findCanUpdate(context, projection);
    String[] expectedCanUpdate = {
            "installed, old version, no ignore",
            "installed, old version, ignore newer, but not latest",
            // These are ignored because they don't have updates available:
            // "installed, only one version available",
            // "installed, already latest, no ignore",
            // "installed, already latest, ignore old",
            // "not installed",
            // These four should be ignored due to the app preferences:
            // "installed, already latest, ignore all",
            // "installed, already latest, ignore latest",
            // "installed, old version, ignore all",
            // "installed, old version, ignore latest",
    };
    assertContainsOnlyIds(canUpdateApps, expectedCanUpdate);
}