LeaderContext implements Context { @Override public void yield() { this.leadershipController.revoke(); } LeaderContext(Candidate candidate, LeadershipController leadershipController); @Override boolean isLeader(); @Override void yield();  }
@Test public void shouldYieldLeadership() { this.leaderContext.yield(); verify(this.mockLeadershipController).revoke(); }