@Test public void delegatesReconnected() { LeaseState leaseState = mock(LeaseState.class); ClientDescriptor clientDescriptor = mock(ClientDescriptor.class); LeaseServiceImpl leaseService = new LeaseServiceImpl(new LeaseConfiguration(1000), leaseState); leaseService.reconnected(clientDescriptor); verify(leaseState).reconnected(clientDescriptor, 1000L); }
@Override public void reconnected(ClientDescriptor clientDescriptor) { leaseState.reconnected(clientDescriptor, getLeaseLength()); }
LeaseServiceImpl implements LeaseService { @Override public void reconnected(ClientDescriptor clientDescriptor) { leaseState.reconnected(clientDescriptor, getLeaseLength()); } }
LeaseServiceImpl implements LeaseService { @Override public void reconnected(ClientDescriptor clientDescriptor) { leaseState.reconnected(clientDescriptor, getLeaseLength()); } LeaseServiceImpl(LeaseConfiguration leaseConfiguration, LeaseState leaseState); }
LeaseServiceImpl implements LeaseService { @Override public void reconnected(ClientDescriptor clientDescriptor) { leaseState.reconnected(clientDescriptor, getLeaseLength()); } LeaseServiceImpl(LeaseConfiguration leaseConfiguration, LeaseState leaseState); @Override LeaseResult acquireLease(ClientDescriptor clientDescriptor); @Override void disconnected(ClientDescriptor clientDescriptor); @Override void reconnecting(ClientDescriptor clientDescriptor); @Override void reconnected(ClientDescriptor clientDescriptor); }
LeaseServiceImpl implements LeaseService { @Override public void reconnected(ClientDescriptor clientDescriptor) { leaseState.reconnected(clientDescriptor, getLeaseLength()); } LeaseServiceImpl(LeaseConfiguration leaseConfiguration, LeaseState leaseState); @Override LeaseResult acquireLease(ClientDescriptor clientDescriptor); @Override void disconnected(ClientDescriptor clientDescriptor); @Override void reconnecting(ClientDescriptor clientDescriptor); @Override void reconnected(ClientDescriptor clientDescriptor);  }