@Test
public void testInsert() {

    assertResultCount(contentResolver, 0, InstalledAppProvider.getContentUri());
    insertInstalledApp("com.example.com1", 1, "v1");
    insertInstalledApp("com.example.com2", 2, "v2");
    insertInstalledApp("com.example.com3", 3, "v3");
    assertResultCount(contentResolver, 3, InstalledAppProvider.getContentUri());
    assertIsInstalledVersionInDb(contentResolver, "com.example.com1", 1, "v1");
    assertIsInstalledVersionInDb(contentResolver, "com.example.com2", 2, "v2");
    assertIsInstalledVersionInDb(contentResolver, "com.example.com3", 3, "v3");
    App[] apps = InstalledAppProvider.Helper.all(context);
    assertEquals(3, apps.length);
}