### Question:
SubjectFilter extends EnvironmentFilter { public void setConnectionSubjectFactory(ConnectionSubjectFactory connectionSubjectFactory) { if (connectionSubjectFactory == null) { throw new IllegalArgumentException("ConnectionSubjectFactory argument cannot be null."); } this.connectionSubjectFactory = connectionSubjectFactory; } SubjectFilter(); ConnectionSubjectFactory getConnectionSubjectFactory(); void setConnectionSubjectFactory(ConnectionSubjectFactory connectionSubjectFactory); SecurityContextFactory getSecurityContextFactory(); void setSecurityContextFactory(SecurityContextFactory securityContextFactory); @Override void addConnection(ConnectionContext context, ConnectionInfo info); @Override void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void setNullSubjectConnectionFactory() { filter.setConnectionSubjectFactory(null); }