@Test public void testSetValueTriggersCharacteristicsChanged() { HashMap<BasicStudyCharacteristic, Object> newVal = new HashMap<BasicStudyCharacteristic, Object>(); Indication indication = new Indication(1L, "Indication"); newVal.put(d_char, indication); PropertyChangeListener l = JUnitUtil.mockListener(d_study.getCharacteristics(), MapBean.PROPERTY_CONTENTS, null, null); d_study.getCharacteristics().addPropertyChangeListener(l); d_holder.setValue(indication); verify(l); }
@Test public void testGetCharacteristic() { assertEquals(d_char, d_holder.getCharacteristic()); }