this.jf1 = new JFrame();
final AttributeBooleanButtonCometeV2 abb = new AttributeBooleanButtonCometeV2.Builder(
m_deviceName, nameAttr).jframe(this.jf1).build();
Sleeper.SECONDS.sleep(3);
final BooleanAttributeListenerImpl listenerTest = new BooleanAttributeListenerImpl();
abb.addBooleanAttributeListener(listenerTest);
deviceValue = !deviceValue;
this.m_deviceProxy.write_attribute(new DeviceAttribute(nameAttr,
deviceValue));
Sleeper.SECONDS.sleep(3);
// Test listener is notify only one time (per methods)
// FIXME : should be called 3 time
assertThat(listenerTest.getNotifyCount()).isEqualTo(2);
assertThat(
(Boolean) listenerTest
.getNotification("readBooleanValueChange")).isEqualTo(
deviceValue);
assertThat(
(Boolean) listenerTest
.getNotification("writeBooleanValueChange")).isEqualTo(
deviceValue);
// FIXME : stateChange return null instead of VALID
// assertThat((String) listenerTest.getNotification("stateChange"))
// .isEqualTo("VALID");