CallItem extends GenericItem { @Override public void setState(State state) { if (isAcceptedState(acceptedDataTypes, state)) { super.setState(state); } else { logSetTypeError(state); } } CallItem(String name); @Override List<Class<? extends State>> getAcceptedDataTypes(); @Override List<Class<? extends Command>> getAcceptedCommandTypes(); @Override void setState(State state);  }
@Test public void testSetStringListType() { StringListType callType1 = new StringListType("0699222222", "0179999998"); CallItem callItem1 = new CallItem("testItem"); callItem1.setState(callType1); assertEquals(callItem1.toString(), "testItem (Type=CallItem, State=0699222222,0179999998, Label=null, Category=null)"); callType1 = new StringListType("0699222222,0179999998"); callItem1.setState(callType1); assertEquals(callItem1.toString(), "testItem (Type=CallItem, State=0699222222,0179999998, Label=null, Category=null)"); }