@Test
public void testWeighted()
{

    URI uriLowWeight = URI.create("http://apple-a.example.com");
    URI uriHighWeight = URI.create("https://apple-a.example.com");
    httpServiceBalancer.updateHttpUris(ImmutableList.of(uriLowWeight, uriHighWeight, uriHighWeight, uriHighWeight));
    consumeUri(uriHighWeight);
    assertThat(frequencyOfUri(uriLowWeight)).isBetween(25.0, 40.0);
    consumeUri(uriHighWeight);
    assertThat(frequencyOfUri(uriLowWeight)).isBetween(45.0, 55.0);
    consumeUri(uriHighWeight);
    assertThat(frequencyOfUri(uriLowWeight)).isEqualTo(100.0);
    consumeUri(uriLowWeight);
    assertThat(frequencyOfUri(uriLowWeight)).isBetween(20.0, 30.0);
}