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