### Question:
AuthenticationFilter extends EnvironmentFilter { public void setAuthenticationTokenFactory(AuthenticationTokenFactory authenticationTokenFactory) { this.authenticationTokenFactory = authenticationTokenFactory; } AuthenticationFilter(); AuthenticationPolicy getAuthenticationPolicy(); void setAuthenticationPolicy(AuthenticationPolicy authenticationPolicy); AuthenticationTokenFactory getAuthenticationTokenFactory(); void setAuthenticationTokenFactory(AuthenticationTokenFactory authenticationTokenFactory); @Override void addConnection(ConnectionContext context, ConnectionInfo info); @Override void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error);  }### Answer:
@Test public void testSetAuthenticationTokenFactory() { AuthenticationTokenFactory factory = new AuthenticationTokenFactory() { @Override public AuthenticationToken getAuthenticationToken(SubjectConnectionReference ref) throws Exception { return null; } }; filter.setAuthenticationTokenFactory(factory); assertSame(factory, filter.getAuthenticationTokenFactory()); }