### Question:
LeaderBean extends ZooKeeperServerBean implements LeaderMXBean { @Override public long getElectionTimeTaken() { return leader.self.getElectionTimeTaken(); } LeaderBean(Leader leader, ZooKeeperServer zks); String getName(); String getCurrentZxid(); String followerInfo(); @Override String nonVotingFollowerInfo(); @Override long getElectionTimeTaken(); @Override int getLastProposalSize(); @Override int getMinProposalSize(); @Override int getMaxProposalSize(); @Override void resetProposalStatistics(); @Override int getMaxConcurrentSnapSyncs(); @Override void setMaxConcurrentSnapSyncs(int maxConcurrentSnapshots); @Override int getMaxConcurrentDiffSyncs(); @Override void setMaxConcurrentDiffSyncs(int maxConcurrentDiffSyncs);  }### Answer:
@Test public void testGetElectionTimeTaken() { qp.setElectionTimeTaken(1); assertEquals(1, leaderBean.getElectionTimeTaken()); }