@Test
public void analyze_callsSuggesters() throws Exception {

  BundleAnalyzer analyzer = new BundleAnalyzer(testArtifactSuggesters, testEntrySuggesters);
  File bundleFile = TestUtils.getTestDataFile(APP_BUNDLE);
  BundleContext context = BundleContext.create(/* minSdkVersion= */ 23);
  Suggestion stubSuggestion =
      Suggestion.create(
          Suggestion.IssueType.WEBP,
          Suggestion.Category.WEBP,
          Payload.getDefaultInstance(),
          "Stub Suggestion",
          /* estimatedBytesSaved= */ null,
          /* autoFix= */ null);
  Suggestion stubArtifactSuggestion =
      Suggestion.create(
          Suggestion.IssueType.WEBP,
          Suggestion.Category.WEBP,
          Payload.getDefaultInstance(),
          "Stub Artifact Suggestion",
          /* estimatedBytesSaved= */ null,
          /* autoFix= */ null);
  suggester.setEntrySuggestions(
      ImmutableMultimap.of(
          ContextAndEntryPath.create(context, "base/manifest/AndroidManifest.xml"),
          stubSuggestion));
  suggester.setArtifactSuggestions(ImmutableMultimap.of(context, stubArtifactSuggestion));
  ImmutableList<Suggestion> suggestions = analyzer.analyze(bundleFile);
  assertThat(suggestions).containsExactly(stubSuggestion, stubArtifactSuggestion);
}