@Test
public void createLoginActivityIntentShouldReturnAnIntentWithExtrasInIt() {

    AuthenticationRequest authenticationRequest =
            new AuthenticationRequest
                    .Builder("test", AuthenticationResponse.Type.TOKEN, "to://me")
                    .setScopes(new String[]{"testa", "toppen"})
                    .build();
    Activity activity = mock(Activity.class);
    Intent intent =
            AuthenticationClient.createLoginActivityIntent(activity, authenticationRequest);
    AuthenticationRequest extra = intent
            .getBundleExtra(LoginActivity.EXTRA_AUTH_REQUEST).getParcelable(LoginActivity.REQUEST_KEY);
    assertNotNull(extra);
    assertEquals("test", extra.getClientId());
    assertEquals("token", extra.getResponseType());
    assertEquals("to://me", extra.getRedirectUri());
    assertEquals(2, extra.getScopes().length);
}