NewPlantActivity extends MundraubBaseActivity { public Plant getPlant() { return plant; }  void setPlantCategory(PlantCategory plantCategory); Plant getPlant(); static final String ARG_PLANT_ID; static final String ARG_PLANT_LOCATION_MAP_URL; }
@Test public void saveButtonClickShouldRemoveNewPlant() { Plant plant = activity.getPlant(); Button button = (Button) activity.findViewById(R.id.button_save); button.performClick(); assertFalse(plant.exists()); }
@Test public void saveButtonClickShouldNotRemoveNewPlant() { Plant plant = activity.getPlant(); plant.setDescription("Plant description"); Button button = (Button) activity.findViewById(R.id.button_save); button.performClick(); assertTrue(plant.exists()); }