@Test
public void whenRepeatableRandomReturnsSpecificValue_thenReturnsAppropriateItem() {

    ImmutableMap<String, Double> weightedMap = ImmutableMap.of("A", 1d, "B", 2d, "C", 3d);
    RandomWeightedChooser chooser = new RandomWeightedChooser<>(weightedMap);
    double sum = weightedMap.values().stream().mapToDouble(w -> w).sum();
    RepeatableRandom.initialiseWithFixedValue(0 / sum);
    Assertions.assertEquals(chooser.choose(), "A");
    RepeatableRandom.initialiseWithFixedValue(0.9 / sum);
    Assertions.assertEquals(chooser.choose(), "A");
    RepeatableRandom.initialiseWithFixedValue(1.1 / sum);
    Assertions.assertEquals(chooser.choose(), "B");
    RepeatableRandom.initialiseWithFixedValue(2.9 / sum);
    Assertions.assertEquals(chooser.choose(), "B");
    RepeatableRandom.initialiseWithFixedValue(3.1 / sum);
    Assertions.assertEquals(chooser.choose(), "C");
    RepeatableRandom.initialiseWithFixedValue(5.9 / sum);
    Assertions.assertEquals(chooser.choose(), "C");
}