### Question:
TokenGenerator { public void setTokenToResponseHeader(final HttpServletResponse res, final String token) { if(res.containsHeader(X_BONITA_API_TOKEN)){ res.setHeader(X_BONITA_API_TOKEN, token); } else { res.addHeader(X_BONITA_API_TOKEN, token); } }  @Deprecated void setTokenToResponseCookie(HttpServletRequest request, HttpServletResponse res, Object apiTokenFromClient); String createOrLoadToken(final HttpSession session); void setTokenToResponseHeader(final HttpServletResponse res, final String token); static final String API_TOKEN; static final String X_BONITA_API_TOKEN; }### Answer:
@Test public void testSetTokenToResponseHeader() throws Exception { tokenGenerator.setTokenToResponseHeader(response, BONITA_TOKEN_VALUE); assertThat(response.getHeader(BONITA_TOKEN_NAME)).isEqualTo(BONITA_TOKEN_VALUE); }