@Test public void delegatesDisconnected() { LeaseState leaseState = mock(LeaseState.class); ClientDescriptor clientDescriptor = mock(ClientDescriptor.class); LeaseServiceImpl leaseService = new LeaseServiceImpl(new LeaseConfiguration(1000), leaseState); leaseService.disconnected(clientDescriptor); verify(leaseState).disconnected(clientDescriptor); }
@Override public void disconnected(ClientDescriptor clientDescriptor) { leaseState.disconnected(clientDescriptor); }
LeaseServiceImpl implements LeaseService { @Override public void disconnected(ClientDescriptor clientDescriptor) { leaseState.disconnected(clientDescriptor); } }
LeaseServiceImpl implements LeaseService { @Override public void disconnected(ClientDescriptor clientDescriptor) { leaseState.disconnected(clientDescriptor); } LeaseServiceImpl(LeaseConfiguration leaseConfiguration, LeaseState leaseState); }
LeaseServiceImpl implements LeaseService { @Override public void disconnected(ClientDescriptor clientDescriptor) { leaseState.disconnected(clientDescriptor); } 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 disconnected(ClientDescriptor clientDescriptor) { leaseState.disconnected(clientDescriptor); } 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);  }