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