@Test
public void testUpdate() {

    insertInstalledApp("com.example.app1", 10, "1.0");
    insertInstalledApp("com.example.app2", 10, "1.0");
    assertResultCount(contentResolver, 2, InstalledAppProvider.getContentUri());
    assertIsInstalledVersionInDb(contentResolver, "com.example.app2", 10, "1.0");
    contentResolver.insert(
            InstalledAppProvider.getContentUri(),
            createContentValues("com.example.app2", 11, "1.1")
    );
    assertResultCount(contentResolver, 2, InstalledAppProvider.getContentUri());
    assertIsInstalledVersionInDb(contentResolver, "com.example.app2", 11, "1.1");
}