@Test
public void testOAuth() {

    Task task = new Task();
    Input input = new Input();
    input.setUri("http://localhost:7009/oauth");
    input.setMethod("POST");
    input.setOauthConsumerKey("someKey");
    input.setOauthConsumerSecret("someSecret");
    task.getInputData().put(HttpTask.REQUEST_PARAMETER_NAME, input);
    httpTask.start(workflow, task, workflowExecutor);
    Map<String, Object> response = (Map<String, Object>) task.getOutputData().get("response");
    Map<String, String> body = (Map<String, String>) response.get("body");
    assertEquals("someKey", body.get("oauth_consumer_key"));
    assertTrue("Should have OAuth nonce", body.containsKey("oauth_nonce"));
    assertTrue("Should have OAuth signature", body.containsKey("oauth_signature"));
    assertTrue("Should have OAuth signature method", body.containsKey("oauth_signature_method"));
    assertTrue("Should have OAuth oauth_timestamp", body.containsKey("oauth_timestamp"));
    assertTrue("Should have OAuth oauth_version", body.containsKey("oauth_version"));
    assertEquals("Task output: " + task.getOutputData(), Status.COMPLETED, task.getStatus());
}