public void allocationQuantum(int allocationQuantum) {
        checkPositive(allocationQuantum, "allocationQuantum");
        this.allocationQuantum = allocationQuantum;
    }
@Test
    public void writeShouldPreferHighestWeight() throws Http2Exception {
        // Root the streams at the connection and assign weights.
        setPriority(STREAM_A, 0, (short) 50, false);
        setPriority(STREAM_B, 0, (short) 200, false);
        setPriority(STREAM_C, 0, (short) 100, false);
        setPriority(STREAM_D, 0, (short) 100, false);

        initState(STREAM_A, 1000, true);
        initState(STREAM_B, 1000, true);
        initState(STREAM_C, 1000, true);
        initState(STREAM_D, 1000, true);

        // Set allocation quantum to 1 so it is easier to see the ratio of total bytes written between each stream.
        distributor.allocationQuantum(1);
        assertTrue(write(1000));

        assertEquals(100, captureWrites(STREAM_A));
        assertEquals(450, captureWrites(STREAM_B));
        assertEquals(225, captureWrites(STREAM_C));
        assertEquals(225, captureWrites(STREAM_D));
    }