@Test public void checkSizeSavedNullWithNoSavedBytes() { Suggestion zeroSuggestion = Suggestion.create( Suggestion.IssueType.WEBP, Suggestion.Category.WEBP, Payload.getDefaultInstance(), "Convert drawing.png to webp with lossless encoding", null, new AutoFix() { @Override public void apply() { } }); SuggestionData zeroSuggestionData = factory.fromSuggestion(zeroSuggestion); assertThat(zeroSuggestionData.getBytesSaved()).isNull(); }
@Nullable public String getBytesSaved() { Long bytesSaved = suggestion.getEstimatedBytesSaved(); return DisplayUtil.renderBytesSaved(bytesSaved); }
SuggestionData { @Nullable public String getBytesSaved() { Long bytesSaved = suggestion.getEstimatedBytesSaved(); return DisplayUtil.renderBytesSaved(bytesSaved); } }
SuggestionData { @Nullable public String getBytesSaved() { Long bytesSaved = suggestion.getEstimatedBytesSaved(); return DisplayUtil.renderBytesSaved(bytesSaved); } SuggestionData(
      Suggestion suggestion,
      @Nullable String title,
      @Nullable String description,
      @Nullable String moreInfo,
      @Nullable String autoFixTitle); }
SuggestionData { @Nullable public String getBytesSaved() { Long bytesSaved = suggestion.getEstimatedBytesSaved(); return DisplayUtil.renderBytesSaved(bytesSaved); } SuggestionData(
      Suggestion suggestion,
      @Nullable String title,
      @Nullable String description,
      @Nullable String moreInfo,
      @Nullable String autoFixTitle); @Override String toString(); String getTitle(); @Nullable String getDesc(); @Nullable String getMoreInfo(); @Nullable String getBytesSaved(); @Nullable AutoFix getAutoFix(); @Nullable String getAutoFixTitle(); }
SuggestionData { @Nullable public String getBytesSaved() { Long bytesSaved = suggestion.getEstimatedBytesSaved(); return DisplayUtil.renderBytesSaved(bytesSaved); } SuggestionData(
      Suggestion suggestion,
      @Nullable String title,
      @Nullable String description,
      @Nullable String moreInfo,
      @Nullable String autoFixTitle); @Override String toString(); String getTitle(); @Nullable String getDesc(); @Nullable String getMoreInfo(); @Nullable String getBytesSaved(); @Nullable AutoFix getAutoFix(); @Nullable String getAutoFixTitle();  }