public void testApplyDeregister() throws Exception {
GossipMessages handler = mock(GossipMessages.class);
GossipCommunications communications = mock(GossipCommunications.class);
when(communications.handlerFor(isA(InetSocketAddress.class))).thenReturn(handler);
FailureDetectorFactory fdFactory = mock(FailureDetectorFactory.class);
SystemView view = mock(SystemView.class);
Random random = mock(Random.class);
InetSocketAddress localAddress = new InetSocketAddress("127.0.0.1", 0);
when(communications.getLocalAddress()).thenReturn(localAddress);
final GossipListener receiver = mock(GossipListener.class);