@Override
    public void updateDependencyTree(int childStreamId, int parentStreamId, short weight, boolean exclusive) {
        // It is assumed there are all validated at a higher level. For example in the Http2FrameReader.
        assert weight >= MIN_WEIGHT && weight <= MAX_WEIGHT : "Invalid weight";
        assert childStreamId != parentStreamId : "A stream cannot depend on itself";
        assert childStreamId > 0 && parentStreamId >= 0 : "childStreamId must be > 0. parentStreamId must be >= 0.";

        streamByteDistributor.updateDependencyTree(childStreamId, parentStreamId, weight, exclusive);
    }
@Test
    public void invalidWeightTooBigThrows() {
        assertThrows(AssertionError.class, new Executable() {
            @Override
            public void execute() throws Throwable {
                controller.updateDependencyTree(STREAM_A, STREAM_D, (short) (MAX_WEIGHT + 1), true);
            }
        });
    }