@Test public void testVoteYes() throws Exception { future.voteYes(); future.voteYes(); future.voteYes(); assertFutureEquals(result, future); }
void voteYes() { if (castVote()) { synchronized (failures) { resolveResult(); } } }
VotingFuture extends AbstractFuture<T> { void voteYes() { if (castVote()) { synchronized (failures) { resolveResult(); } } } }
VotingFuture extends AbstractFuture<T> { void voteYes() { if (castVote()) { synchronized (failures) { resolveResult(); } } } VotingFuture(final T result, final int requiredVotes); }
VotingFuture extends AbstractFuture<T> { void voteYes() { if (castVote()) { synchronized (failures) { resolveResult(); } } } VotingFuture(final T result, final int requiredVotes);  }
VotingFuture extends AbstractFuture<T> { void voteYes() { if (castVote()) { synchronized (failures) { resolveResult(); } } } VotingFuture(final T result, final int requiredVotes);   }