    public void runTest(String test, boolean registerInfo) throws IOException, URISyntaxException {
        String dexFilePath = String.format("%s%sclasses.dex", test, File.separatorChar);
        DexFile dexFile = DexFileFactory.loadDexFile(findResource(dexFilePath), 15);
        baksmaliOptions options = new baksmaliOptions();
        if (registerInfo) {
            options.registerInfo = baksmaliOptions.ALL | baksmaliOptions.FULLMERGE;
            options.classPath = new ClassPath();
        }
        for (ClassDef classDef: dexFile.getClasses()) {
            StringWriter stringWriter = new StringWriter();
            IndentingWriter writer = new IndentingWriter(stringWriter);
            ClassDefinition classDefinition = new ClassDefinition(options, classDef);
            classDefinition.writeTo(writer);
            writer.close();
            String className = classDef.getType();
            String smaliPath = String.format("%s%s%s.smali", test, File.separatorChar,
                    className.substring(1, className.length() - 1));
            String smaliContents = readResource(smaliPath);
            Assert.assertEquals(smaliContents.replace("\r\n", "\n"), stringWriter.toString().replace("\r\n", "\n"));
        }
    }

    public void runTest(String test, boolean registerInfo) throws IOException, URISyntaxException {
        String dexFilePath = String.format("%s%sclasses.dex", test, File.separatorChar);
        DexFile dexFile = DexFileFactory.loadDexFile(findResource(dexFilePath), 15);
        baksmaliOptions options = new baksmaliOptions();
        if (registerInfo) {
            options.registerInfo = baksmaliOptions.ALL | baksmaliOptions.FULLMERGE;
            options.classPath = new ClassPath();
        }
        for (ClassDef classDef: dexFile.getClasses()) {
            StringWriter stringWriter = new StringWriter();
            IndentingWriter writer = new IndentingWriter(stringWriter);
            ClassDefinition classDefinition = new ClassDefinition(options, classDef);
            classDefinition.writeTo(writer);
            writer.close();
            String className = classDef.getType();
            String smaliPath = String.format("%s%s%s.smali", test, File.separatorChar,
                    className.substring(1, className.length() - 1));
            String smaliContents = readResource(smaliPath);
            Assert.assertEquals(smaliContents.replace("\r", "").replace("\n", System.lineSeparator()),
                    stringWriter.toString().replace("\r", "").replace("\n", System.lineSeparator()));
        }
    }
