EventDetailsActivity extends BaseActivity<ActivityEventDetailBinding> { public static Intent start(Context context, Event event, Association association) { Intent intent = new Intent(context, EventDetailsActivity.class); intent.putExtra(PARCEL_EVENT, event); intent.putExtra(PARCEL_ASSOCIATION, association); return intent; }  static Intent start(Context context, Event event, Association association); @Override boolean onOptionsItemSelected(MenuItem item); @Override boolean onCreateOptionsMenu(Menu menu); @Override boolean onPrepareOptionsMenu(Menu menu); static final String PARCEL_EVENT; static final String PARCEL_ASSOCIATION; }
@Test public void shouldReturnCorrectIntent_whenStartIsCalled() { Event e = Utils.generate(Event.class); Association a = Utils.generate(Association.class); Intent actual = EventDetailsActivity.start(RobolectricUtils.getActivityContext(), e, a); Intent expected = new Intent(RobolectricUtils.getActivityContext(), EventDetailsActivity.class); assertEquals(expected.getComponent(), actual.getComponent()); assertEquals(e, actual.getParcelableExtra(EventDetailsActivity.PARCEL_EVENT)); }