@Test
public void onActivityResultHandlesSuccess() throws Exception {

    XingOAuth xingOAuth = buildTestXingOauth();
    Intent data = new Intent();
    data.putExtra(Shared.TOKEN, "test");
    data.putExtra(Shared.TOKEN_SECRET, "test_test");
    OAuthResponse response = xingOAuth.onActivityResult(Shared.REQUEST_CODE, Activity.RESULT_OK, data);
    assertThat(response).isNotNull();
    assertThat(response.isSuccessful()).isTrue();
    assertThat(response.token()).isEqualTo("test");
    assertThat(response.tokenSecret()).isEqualTo("test_test");
}