### Question:
FollowerNodeRole extends AbstractNodeRole { @Override public RoleState getState() { DefaultRoleState state = new DefaultRoleState(RoleName.FOLLOWER, term); state.setVotedFor(votedFor); state.setLeaderId(leaderId); return state; } FollowerNodeRole(int term, NodeId votedFor, NodeId leaderId, ElectionTimeout electionTimeout); NodeId getVotedFor(); NodeId getLeaderId(); @Override NodeId getLeaderId(NodeId selfId); @Override void cancelTimeoutOrTask(); @Override RoleState getState(); @Override String toString();  }### Answer:
@Test public void testGetState() { FollowerNodeRole role = new FollowerNodeRole(1, NodeId.of("B"), NodeId.of("A"), ElectionTimeout.NONE); RoleState state = role.getState(); Assert.assertEquals(1, state.getTerm()); Assert.assertEquals(NodeId.of("B"), state.getVotedFor()); Assert.assertEquals(NodeId.of("A"), state.getLeaderId()); }