@Test
void testMultipleWeights() {

    NonNegativeIntegerSplitterByWeights<String> splitter = new NonNegativeIntegerSplitterByWeights<>(ImmutableMap.of(
            "A", 1d,
            "B", 2d));
    ImmutableMap<String, Integer> splitInts = splitter.split(1);
    Assertions.assertEquals(0, (int)splitInts.get("A"));
    Assertions.assertEquals(1, (int)splitInts.get("B"));
    splitInts = splitter.split(2);
    Assertions.assertEquals(1, (int)splitInts.get("A"));
    Assertions.assertEquals(1, (int)splitInts.get("B"));
    splitInts = splitter.split(100);
    Assertions.assertEquals(33, (int)splitInts.get("A"));
    Assertions.assertEquals(67, (int)splitInts.get("B"));
    splitInts = splitter.split(101);
    Assertions.assertEquals(34, (int)splitInts.get("A"));
    Assertions.assertEquals(67, (int)splitInts.get("B"));
}