@Test
public void queryAppsInCategories() {

    insertAppWithCategory("com.dog", "Dog", "Animal");
    insertAppWithCategory("com.cat", "Cat", "Animal");
    insertAppWithCategory("com.crow", "Crow", "Animal,Bird");
    insertAppWithCategory("com.chicken", "Chicken", "Animal,Bird,Food");
    insertAppWithCategory("com.bird-statue", "Bird Statue", "Bird,Mineral");
    insertAppWithCategory("com.rock", "Rock", "Mineral");
    insertAppWithCategory("com.banana", "Banana", "Food");
    assertPackagesInCategory("Animal", new String[]{
            "com.dog",
            "com.cat",
            "com.crow",
            "com.chicken",
    });
    assertPackagesInCategory("animal", new String[]{
            "com.dog",
            "com.cat",
            "com.crow",
            "com.chicken",
    });
    assertPackagesInCategory("Bird", new String[]{
            "com.crow",
            "com.chicken",
            "com.bird-statue",
    });
    assertPackagesInCategory("Food", new String[]{
            "com.chicken",
            "com.banana",
    });
    assertPackagesInCategory("Mineral", new String[]{
            "com.rock",
            "com.bird-statue",
    });
    assertNoPackagesInUri(AppProvider.getCategoryUri("Not a category"));
}