@Test(expected = NullPointerException.class) public void setCategories_shouldThrowNpeForNullArgument() { new Book().setCategories(null); }
public void setCategories(@Nonnull final Set<String> categories) { this.categories = new LinkedHashSet<String>(checkNotNull(categories, "Argument[categories] must not be null")); }
Book implements Serializable, Comparable<Book> { public void setCategories(@Nonnull final Set<String> categories) { this.categories = new LinkedHashSet<String>(checkNotNull(categories, "Argument[categories] must not be null")); } }
Book implements Serializable, Comparable<Book> { public void setCategories(@Nonnull final Set<String> categories) { this.categories = new LinkedHashSet<String>(checkNotNull(categories, "Argument[categories] must not be null")); }  }
Book implements Serializable, Comparable<Book> { public void setCategories(@Nonnull final Set<String> categories) { this.categories = new LinkedHashSet<String>(checkNotNull(categories, "Argument[categories] must not be null")); }  @XmlElement(name = "isbn") String getIsbn(); void setIsbn(@Nonnull final String isbn); @Nullable @XmlElement(name = "author") String getAuthor(); void setAuthor(@Nullable final String author); @Nullable @XmlElement(name = "title") String getTitle(); void setTitle(@Nullable final String title); @Nullable @XmlElement(name = "price") BigDecimal getPrice(); void setPrice(@Nullable final BigDecimal price); @Nonnull @XmlElement(name = "category") Set<String> getCategories(); void setCategories(@Nonnull final Set<String> categories); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); @Override int compareTo(final Book that); }
Book implements Serializable, Comparable<Book> { public void setCategories(@Nonnull final Set<String> categories) { this.categories = new LinkedHashSet<String>(checkNotNull(categories, "Argument[categories] must not be null")); }  @XmlElement(name = "isbn") String getIsbn(); void setIsbn(@Nonnull final String isbn); @Nullable @XmlElement(name = "author") String getAuthor(); void setAuthor(@Nullable final String author); @Nullable @XmlElement(name = "title") String getTitle(); void setTitle(@Nullable final String title); @Nullable @XmlElement(name = "price") BigDecimal getPrice(); void setPrice(@Nullable final BigDecimal price); @Nonnull @XmlElement(name = "category") Set<String> getCategories(); void setCategories(@Nonnull final Set<String> categories); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); @Override int compareTo(final Book that);  }