### Question:
VoteProposer { public Optional<ValidatorVote> getVote(final Address localAddress, final VoteTally tally) { final Collection<Address> validators = tally.getValidators(); final List<Map.Entry<Address, VoteType>> validVotes = new ArrayList<>(); proposals .entrySet() .forEach( proposal -> { if (voteNotYetCast( localAddress, proposal.getKey(), proposal.getValue(), validators, tally)) { validVotes.add(proposal); } }); if (validVotes.isEmpty()) { return Optional.empty(); } final int currentVotePosition = votePosition.updateAndGet(i -> ++i % validVotes.size()); final Map.Entry<Address, VoteType> voteToCast = validVotes.get(currentVotePosition); return Optional.of(new ValidatorVote(voteToCast.getValue(), localAddress, voteToCast.getKey())); }  void auth(final Address address); void drop(final Address address); void discard(final Address address); Map<Address, VoteType> getProposals(); Optional<VoteType> get(final Address address); Optional<ValidatorVote> getVote(final Address localAddress, final VoteTally tally);  }### Answer:
@Test public void emptyProposerReturnsNoVotes() { final VoteProposer proposer = new VoteProposer(); assertThat(proposer.getVote(localAddress, new VoteTally(Collections.emptyList()))) .isEqualTo(Optional.empty()); assertThat( proposer.getVote( localAddress, new VoteTally( Arrays.asList( Address.fromHexString("0"), Address.fromHexString("1"), Address.fromHexString("2"))))) .isEqualTo(Optional.empty()); }