CategoryData { @Override public String toString() { return CATEGORY_TO_STRING.get(category); } CategoryData(Category category);  CategoryData(Category category, int totalSuggestions);  CategoryData(Category category, int totalSuggestions, long bytesSaved); @Override String toString(); int totalSuggestions(); @Nullable String totalSizeSaved();  }
@Test public void checkCategoriesHaveValidStringRepresentations() throws Exception { for (Category category : Category.values()) { CategoryData categoryData = new CategoryData(category); assertThat(categoryData.toString()).isNotEmpty(); } }