### Question:
StaticResponseHandler extends GenericHeapObject implements Handler { @Override public Promise<Response, NeverThrowsException> handle(final Context context, final Request request) { Bindings bindings = bindings(context, request); Response response = new Response(); response.setStatus(this.status); if (this.version != null) { response.setVersion(this.version); } for (String key : this.headers.keySet()) { for (Expression<String> expression : this.headers.get(key)) { String eval = expression.eval(bindings); if (eval != null) { response.getHeaders().add(key, eval); } } } if (entity != null) { response.setEntity(entity.eval(bindings)); } return Promises.newResultPromise(response); } StaticResponseHandler(final Status status);  StaticResponseHandler(final Status status,
                                 final String version,
                                 final Expression<String> entity); StaticResponseHandler addHeader(final String key, final Expression<String> expression); @Override Promise<Response, NeverThrowsException> handle(final Context context, final Request request);  }### Answer:
@Test public void shouldEvaluateTheEntityExpressionContent() throws Exception { Expression<String> expression = Expression.valueOf("<a href='/login?goto=${urlEncode(attributes.goto)}'>GOTO</a>", String.class); final StaticResponseHandler handler = new StaticResponseHandler(Status.OK, null, expression); final AttributesContext context = new AttributesContext(new RootContext()); context.getAttributes().put("goto", "http: Response response = handler.handle(context, null).get(); assertThat(response.getStatus()).isEqualTo(Status.OK); assertThat(response.getEntity().getString()).isEqualTo( "<a href='/login?goto=http%3A%2F%2Fgoto.url'>GOTO</a>"); }