@Test
public void testFindGlobs() throws IOException, LogAbortException {

    Map<String, ClassReader> zipClasses = mAa.parseZip(mOsJarPath);
    TreeMap<String, ClassReader> found = new TreeMap<String, ClassReader>();
    // this matches classes, a package match returns nothing
    found.clear();
    mAa.findGlobs("mock_android.view", zipClasses, found);
    assertArrayEquals(new String[] { },
        found.keySet().toArray());
    // a complex glob search. * is a search pattern that matches names, not dots
    mAa.findGlobs("mock_android.*.*Group$*Layout*", zipClasses, found);
    assertArrayEquals(new String[] {
            "mock_android.view.ViewGroup$LayoutParams",
            "mock_android.view.ViewGroup$MarginLayoutParams"
        },
        found.keySet().toArray());
    // a complex glob search. ** is a search pattern that matches names including dots
    mAa.findGlobs("mock_android.**Group*", zipClasses, found);
    assertArrayEquals(new String[] {
            "mock_android.view.ViewGroup",
            "mock_android.view.ViewGroup$LayoutParams",
            "mock_android.view.ViewGroup$MarginLayoutParams"
        },
        found.keySet().toArray());
    // matches a single class
    found.clear();
    mAa.findGlobs("mock_android.view.View", zipClasses, found);
    assertArrayEquals(new String[] {
            "mock_android.view.View"
        },
        found.keySet().toArray());
    // matches everyting inside the given package but not sub-packages
    found.clear();
    mAa.findGlobs("mock_android.view.*", zipClasses, found);
    assertArrayEquals(new String[] {
            "mock_android.view.View",
            "mock_android.view.ViewGroup",
            "mock_android.view.ViewGroup$LayoutParams",
            "mock_android.view.ViewGroup$MarginLayoutParams"
        },
        found.keySet().toArray());
    for (String key : found.keySet()) {
        ClassReader value = found.get(key);
        assertNotNull("No value for " + key, value);
        assertEquals(key, AsmAnalyzer.classReaderToClassName(value));
    }
}