### Question:
StreamId { public static long validate(final long id) { Preconditions.checkArgument(id >= 0); Preconditions.checkArgument(id <= Varint.MAX); return id; } private  StreamId(); static long random(final boolean client, final boolean bidirectional); static long next(final long prev, final boolean client, final boolean bidirectional); static long parse(final ByteBuf bb); static long validate(final long id); static boolean isClient(final long id); static boolean isBidirectional(final long id); static void write(final ByteBuf bb, final long id);  }### Answer:
@Test public void validateBounds() { StreamId.validate(0); StreamId.validate(123); StreamId.validate(4611686018427387903L); }
@Test(expected = IllegalArgumentException.class) public void validateBoundsTooSmall() { StreamId.validate(-1); }
@Test(expected = IllegalArgumentException.class) public void validateBoundsTooLarge() { StreamId.validate(4611686018427387904L); }