@Test
  public void testDeterministic() {
    final List<String> order = Lists.newArrayList();
    final Set<String> chosenHosts = Sets.newHashSet();
    final HostPickingStrategy strategy1 = HostPickingStrategies.deterministic("");
    for (int i = 0; i < NUM_ITERATIONS; i++) {
      final String picked = strategy1.pickHost(HOSTS);
      order.add(picked);
      chosenHosts.add(picked);
    }
    // should've hit them all
    assertEquals(HOSTS.size(), chosenHosts.size());

    final HostPickingStrategy strategy2 = HostPickingStrategies.deterministic("");
    for (int i = 0; i < NUM_ITERATIONS; i++) {
      assertEquals("at index " + i, order.get(i), strategy2.pickHost(HOSTS));
    }
  }