### Question:
ZaasJwtService implements TokenService { @Override public void logout(String jwtToken) throws ZaasClientException { doRequest(() -> logoutJwtToken(jwtToken)); } ZaasJwtService(CloseableClientProvider client, String baseUrl); @Override String login(String userId, String password); @Override String login(String authorizationHeader); @Override ZaasToken query(String jwtToken); @Override void logout(String jwtToken);  }### Answer:
@Test public void givenJwtToken_whenLogout_thenSetCookie() throws ZaasClientException, IOException { zaasJwtService.logout(JWT_TOKEN); verify(closeableHttpClient, times(1)).execute( argThat(x -> (x.getHeaders(SM.COOKIE) != null) && (x.getHeaders(SM.COOKIE).length == 1) && (COOKIE_NAME + "=" + JWT_TOKEN).equals(x.getHeaders(SM.COOKIE)[0].getValue()) ) ); }
@Test public void givenAuthorizationHeaderWithJwtToken_whenLogout_thenAuthorizationHeader() throws ZaasClientException, IOException { zaasJwtService.logout(HEADER_AUTHORIZATION); verify(closeableHttpClient, times(1)).execute( argThat(x -> (x.getHeaders(HttpHeaders.AUTHORIZATION) != null) && (x.getHeaders(HttpHeaders.AUTHORIZATION).length == 1) && HEADER_AUTHORIZATION.equals(x.getHeaders(HttpHeaders.AUTHORIZATION)[0].getValue()) ) ); }