### Question:
BundleFileFilter { public AppBundle filter() throws IOException { TimeClock timeClock = new TimeClock(); Map<BundleModuleName, BundleModule> bundleModules = new HashMap<>(); for (Map.Entry<BundleModuleName, BundleModule> entry : rawAppBundle.getModules().entrySet()) { bundleModules.put(entry.getKey(), filterBundleModule(entry.getValue())); } AppBundle appBundle = rawAppBundle.toBuilder() .setBundleMetadata(filterMetaData()) .setModules(ImmutableMap.copyOf(bundleModules)) .build(); System.out.println(String.format( "filter bundle files done, coast %s" + "-----------------------------------------\n" + "Reduce file count: %s\n" + "Reduce file size: %s\n" + "-----------------------------------------", timeClock.getCoast(), filterTotalCount, getNetFileSizeDescription(filterTotalSize) )); return appBundle; } BundleFileFilter(Path bundlePath, AppBundle rawAppBundle, Set<String> filterRules); AppBundle filter();  }### Answer:
@Test public void test() throws IOException { Path bundlePath = loadResourceFile("demo/demo.aab").toPath(); AppBundleAnalyzer analyzer = new AppBundleAnalyzer(bundlePath); AppBundle appBundle = analyzer.analyze(); ImmutableSet<String> filterRules = ImmutableSet.of( "*/arm64-v8a/*" ); BundleFileFilter fileFilter = new BundleFileFilter(loadResourceFile("demo/demo.aab").toPath(), appBundle, new HashSet<>(filterRules)); AppBundle filteredAppBundle = fileFilter.filter(); assert filteredAppBundle != null; }