ProvinceModel implements PickerItem { public ArrayList<CityModel> getCityList() { return mCityList; }  void addCity(CityModel city); CityModel getCity(int position); ArrayList<CityModel> getCityList(); int getCityCount(); List<String> getCityIdList(); List<String> getCityNameList(); @Override String getText(); String toString(); public String id; public String name; }
@Test public void testGetCityList() { assertNull(model.getCityList()); CityModel cityModel = new CityModel(); model.addCity(cityModel); assertEquals(1, model.getCityList().size()); assertTrue(model.getCityList().contains(cityModel)); for (CityModel city : cities) { model.addCity(city); } assertEquals(CITIES_NUM + 1, model.getCityList().size()); assertEquals(cityModel, model.getCityList().get(0)); }