PdpStateChange msg2 = new PdpStateChange();
req.reconfigure(msg2, null);
+ // should have cancelled the first timer
+ verify(timer).cancel();
+
// should only be one token in the queue
QueueToken<PdpMessage> token = queue.poll();
assertNotNull(token);
PdpStateChange msg2 = new PdpStateChange();
req.reconfigure(msg2, null);
+ // should have cancelled the first timer
+ verify(timer).cancel();
+
// should only be one token in the queue
QueueToken<PdpMessage> token = queue.poll();
assertNotNull(token);
verify(timers, times(1)).register(any(), any());
verify(publisher, times(1)).enqueue(any());
assertNull(queue.poll());
+
+ // should NOT have cancelled the timer
+ verify(timer, never()).cancel();
}
@Test
verify(listener).success(PDP1);
verify(listener, never()).failure(any(), any());
+ verify(timer).cancel();
}
@Test
verify(listener, never()).success(any());
verify(listener).failure(DIFFERENT, "PDP name does not match");
+ verify(timer).cancel();
}
@Test