@Test
public void testRefreshAccessTokenURL() throws Exception {

  CloseableHttpResponse response = EasyMock.createNiceMock(CloseableHttpResponse.class);
  StatusLine status = EasyMock.createNiceMock(StatusLine.class);
  EasyMock.expect(response.getStatusLine()).andReturn(status).anyTimes();
  EasyMock.expect(status.getStatusCode()).andReturn(HttpStatus.SC_NOT_FOUND).anyTimes();
  EasyMock.replay(response, status);
  Capture<HttpPost> capturedPost = Capture.newInstance();
  EasyMock.expect(httpClient.execute(EasyMock.capture(capturedPost))).andReturn(response).anyTimes();
  EasyMock.replay(httpClient);
  String token = service.refreshAccessToken(CLIENT_ID, CLIENT_SECRET, CLIENT_TOKEN);
  Assert.assertEquals("client_id=" + CLIENT_ID + "&client_secret=" + CLIENT_SECRET
          + "&refresh_token=" + CLIENT_TOKEN + "&grant_type=refresh_token",
          capturedPost.getValue().getURI().getQuery());
  Assert.assertEquals("-1", token);
}