@Test
public void testNotify() {
sp.addListener("TestDelayNotify_Key", this, 500);
sp.out("TestNotify_Key", "ABCCBA");
assertNull(notifiedValue);
sp.addListener("TestNotify_Key", this);
sp.out("TestNotify_Key", "ABCCBA");
assertEquals(notifiedValue, "ABCCBA");
sp.out("TestNotify_Key", "012345");
assertEquals(notifiedValue, "012345");
assertEquals(sp.inp("TestNotify_Key"), "ABCCBA");
assertEquals(sp.inp("TestNotify_Key"), "ABCCBA");
assertEquals(sp.inp("TestNotify_Key"), "012345");
sp.out("TestDelayNotify_Key", "OLD");
assertEquals(notifiedValue, "OLD");
try {
Thread.sleep(600);
} catch (InterruptedException e) {
}
sp.out("TestDelayNotify_Key", "NEW");
assertEquals(notifiedValue, "OLD");
assertEquals(sp.inp("TestDelayNotify_Key"), "OLD");
assertEquals(sp.inp("TestDelayNotify_Key"), "NEW");
}