### Question:
StreamId { public static long random(final boolean client, final boolean bidirectional) { return encodeType(client, bidirectional, Varint.random(4)); } 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 randomBounds() { for (int i = 0; i < 1000_000; i++) { final long v = StreamId.random(true, true); assertTrue(Long.toString(v), v > 1 && v < 4611686018427387903L); } }