assertSame(node1, new PreferredSingletonElectionPolicy(preference, policy).elect(Arrays.asList(node1, node2)));
assertSame(node1, new PreferredSingletonElectionPolicy(preference, policy).elect(Arrays.asList(node2, node1)));
List<ClusterNode> nodes = Arrays.asList(node2, node3);
when(policy.elect(nodes)).thenReturn(node2);
assertSame(node2, new PreferredSingletonElectionPolicy(preference, policy).elect(nodes));
when(policy.elect(nodes)).thenReturn(node3);