RideRequestActivityBehavior implements RideRequestBehavior { @Override public void requestRide(Context context, RideParameters params) { Intent data = RideRequestActivity.newIntent(context, params, sessionConfiguration, accessTokenStorageKey); activity.startActivityForResult(data, requestCode); } RideRequestActivityBehavior(@NonNull Activity activity, int requestCode);  RideRequestActivityBehavior(@NonNull Activity activity,
                                       int requestCode,
                                       @NonNull SessionConfiguration loginConfiguration);  RideRequestActivityBehavior(@NonNull Activity activity,
                                       int requestCode,
                                       @NonNull SessionConfiguration loginConfiguration,
                                       @NonNull String accessTokenStorageKey); @Override void requestRide(Context context, RideParameters params);  }
@Test public void onRequestRide_shouldLaunchActivity() { Activity activity = Robolectric.setupActivity(Activity.class); ShadowActivity shadowActivity = shadowOf(activity); RideRequestActivityBehavior behavior = new RideRequestActivityBehavior(activity, 4005, new SessionConfiguration.Builder().setClientId("clientId").build()); behavior.requestRide(activity, new RideParameters.Builder().build()); Intent startedIntent = shadowActivity.getNextStartedActivity(); assertThat(startedIntent.getComponent().getClassName()).isEqualTo(RideRequestActivity.class.getName()); }