class DkbAccessTokenService implements AccessTokenService {

    @Override
    public String retrieveToken() {
        if (isNotValid()) {
            logger.debug("Token is not valid");
            Response<TokenResponse> response = httpClient.post(tokenUrl)
                .urlEncodedBody(Collections.singletonMap("grant_type", "client_credentials"))
                .headers(headers)
                .send(responseHandler());
            logger.debug("New token is retrieved");
            accessToken = new AccessToken(response.getBody());
        }
        return accessToken.token;
    }

    private  DkbAccessTokenService();

}