public Future<OAuth2AccessToken> getAccessTokenPasswordGrantAsync(String username, String password) {
        return getAccessTokenPasswordGrantAsync(username, password,
                (OAuthAsyncRequestCallback<OAuth2AccessToken>) null);
    }
@Test
    public void shouldProduceCorrectRequestAsync() throws ExecutionException, InterruptedException, IOException {
        final OAuth20Service service = new ServiceBuilder("your_api_key")
                .apiSecret("your_api_secret")
                .build(new OAuth20ApiUnit());

        final OAuth2AccessToken token = service.getAccessTokenPasswordGrantAsync("user1", "password1").get();

        assertNotNull(token);

        final JsonNode response = OBJECT_MAPPER.readTree(token.getRawResponse());

        assertEquals(OAuth20ServiceUnit.TOKEN, response.get(OAuthConstants.ACCESS_TOKEN).asText());
        assertEquals(OAuth20ServiceUnit.EXPIRES, response.get("expires_in").asInt());

        final String authorize = Base64.encode(
                String.format("%s:%s", service.getApiKey(), service.getApiSecret()).getBytes(Charset.forName("UTF-8")));

        assertEquals(OAuthConstants.BASIC + ' ' + authorize, response.get(OAuthConstants.HEADER).asText());

        assertEquals("user1", response.get("query-username").asText());
        assertEquals("password1", response.get("query-password").asText());
        assertEquals("password", response.get("query-grant_type").asText());
    }