RideRequestActivity extends Activity implements LoginCallback, RideRequestViewCallback { @Override public void onLoginCancel() { setResult(RESULT_CANCELED, null); finish(); }  @NonNull static Intent newIntent(@NonNull Context context,
            @Nullable RideParameters rideParameters,
            @NonNull SessionConfiguration loginConfiguration,
            @Nullable String accessTokenStorageKey); @Override void onCreate(Bundle savedInstanceState); @Override void onErrorReceived(@NonNull RideRequestViewError error); @Override void onLoginCancel(); @Override void onLoginError(@NonNull AuthenticationError error); @Override void onLoginSuccess(@NonNull AccessToken accessToken); @Override void onAuthorizationCodeReceived(@NonNull String authorizationCode); @Override void onRequestPermissionsResult(
            int requestCode,
            @NonNull String[] permissions,
            @NonNull int[] grantResults); static final String AUTHENTICATION_ERROR; static final String RIDE_REQUEST_ERROR; }
@Test public void onLoad_whenLoginCanceled_shouldReturnCanceledResultIntent() { ShadowActivity shadowActivity = shadowOf(activity); activity.onLoginCancel(); assertNull(shadowActivity.getResultIntent()); assertEquals(shadowActivity.getResultCode(), Activity.RESULT_CANCELED); }