### Question:
SsoTokenFilter extends GenericHeapObject implements Filter { @VisibleForTesting Request authenticationRequest(final Bindings bindings) { final Request request = new Request(); request.setMethod("POST"); request.setUri(openamUrl.resolve(BASE_ENDPOINT + realm + AUTHENTICATION_ENDPOINT)); request.setEntity(json(object()).asMap()); request.getHeaders().put("X-OpenAM-Username", username.eval(bindings)); request.getHeaders().put("X-OpenAM-Password", password.eval(bindings)); return request; } SsoTokenFilter(final Handler ssoClientHandler,
                   final URI openamUrl,
                   final String realm,
                   final String headerName,
                   final Expression<String> username,
                   final Expression<String> password); @Override Promise<Response, NeverThrowsException> filter(final Context context,
                                                          final Request request,
                                                          final Handler next);  }### Answer:
@Test public void shouldCreateRequestForSSOToken() throws Exception { final SsoTokenFilter filter = new SsoTokenFilter(authenticate, OPENAM_URI, "/myrealm/sub", DEFAULT_HEADER_NAME, Expression.valueOf("bjensen", String.class), Expression.valueOf("${attributes.password}", String.class)); final Request request = filter.authenticationRequest(bindings(attributesContext, null)); assertThat(request.getHeaders().get("X-OpenAM-Username").getFirstValue()).isEqualTo("bjensen"); assertThat(request.getHeaders().get("X-OpenAM-Password").getFirstValue()).isEqualTo("hifalutin"); assertThat(request.getMethod()).isEqualTo("POST"); assertThat(request.getUri().toASCIIString()).isEqualTo(OPENAM_URI + "json/myrealm/sub/authenticate"); }