CityModel implements PickerItem { @Override public String getText() { return (null == name) ? "" : name; }  @Override String getText(); String toString(); public String id; public String name; }
@Test public void testGetText() { model.name = CITY_NAME; assertEquals(CITY_NAME, model.getText()); model.name = null; assertEquals("", model.getText()); }