TagsListActivity extends NavigationDrawerActivity implements TagsListAdapter.OnFilterChangeListener { protected static Intent createLaunchIntent(@NonNull Context context, @NonNull Class clazz, @NonNull City city) { Intent intent = new Intent(context, clazz); intent.putExtra(EXTRA_CITY, city); return intent; }  @Override boolean onCreateOptionsMenu(Menu menu); @Override boolean onOptionsItemSelected(MenuItem item); @Override void onBackPressed(); @Override void onFilterChanged(List<String> selectedTagsIds); @Override void setContentView(int layoutResID);  }
@Test public void should_create_launch_intent_with_extra_data() { City city = new City(); city.name = "Dalian"; Intent intent = BaggersListActivity.createLaunchIntent(RuntimeEnvironment.application, city); assertThat(intent.getComponent().getClassName()).isEqualTo(BaggersListActivity.class.getName()); assertThat(((City) intent.getParcelableExtra("mCity")).name).isEqualTo("Dalian"); }