ActiveLeaseAcquirer implements ActiveServerEntity<LeaseMessage, LeaseResponse> { @Override public void disconnected(ClientDescriptor clientDescriptor) { leaseService.disconnected(clientDescriptor); connectionSequenceNumbers.remove(clientDescriptor); } ActiveLeaseAcquirer(LeaseService leaseService, ClientCommunicator clientCommunicator, IEntityMessenger<LeaseMessage, LeaseResponse> entityMessenger); @Override void connected(ClientDescriptor clientDescriptor); @Override void disconnected(ClientDescriptor clientDescriptor); @Override LeaseResponse invokeActive(ActiveInvokeContext<LeaseResponse> context, LeaseMessage leaseMessage); @Override ActiveServerEntity.ReconnectHandler startReconnect(); @Override void loadExisting(); @Override void createNew(); @Override void synchronizeKeyToPassive(PassiveSynchronizationChannel<LeaseMessage> passiveSynchronizationChannel, int concurrencyKey); @Override void destroy();  }
@Test public void delegatesDisconnectedToService() { ActiveLeaseAcquirer leaseAcquirer = new ActiveLeaseAcquirer(leaseService, clientCommunicator, entityMessenger); leaseAcquirer.disconnected(clientDescriptor); verify(leaseService).disconnected(clientDescriptor); }