### Question:
Changes { @NonNull public static Changes newInstance( @NonNull Set<String> affectedTables, @Nullable Collection<String> affectedTags ) { return new Changes(affectedTables, nonNullSet(affectedTags)); } private  Changes(@NonNull Set<String> affectedTables, @NonNull Set<String> affectedTags); @NonNull static Changes newInstance(
            @NonNull Set<String> affectedTables,
            @Nullable Collection<String> affectedTags
    ); @NonNull static Changes newInstance(@NonNull Set<String> affectedTables, String... affectedTags); @NonNull static Changes newInstance(
            @NonNull String affectedTable,
            @Nullable Collection<String> affectedTags
    ); @NonNull static Changes newInstance(@NonNull String affectedTable, @Nullable String... affectedTags); @NonNull Set<String> affectedTables(); @NonNull Set<String> affectedTags(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void nullAffectedTablesFails() { expectedException.expect(NullPointerException.class); expectedException.expectMessage("Please specify affected tables"); expectedException.expectCause(nullValue(Throwable.class)); Changes.newInstance((Set<String>) null); }
@Test public void nullAffectedTableFails() { expectedException.expect(NullPointerException.class); expectedException.expectMessage("Please specify affected table"); expectedException.expectCause(nullValue(Throwable.class)); Changes.newInstance((String) null); }
@Test public void emptyAffectedTableAllowed() { Changes.newInstance(""); }
@Test public void shouldNotAllowNullAffectedTag() { expectedException.expect(NullPointerException.class); expectedException.expectMessage(startsWith("affectedTag must not be null or empty, affectedTags = ")); expectedException.expectCause(nullValue(Throwable.class)); Changes.newInstance("table", (String) null); }
@Test public void shouldNotAllowEmptyAffectedTag() { expectedException.expect(IllegalStateException.class); expectedException.expectMessage(startsWith("affectedTag must not be null or empty, affectedTags = ")); expectedException.expectCause(nullValue(Throwable.class)); Changes.newInstance("table", ""); }