@Test
public void testWrap() {

  IntObjectMap<Object> map = new IntObjectHashMap<>();
  StreamIdSupplier s = new StreamIdSupplier(Integer.MAX_VALUE - 3);
  assertEquals(2147483646, s.nextStreamId(map));
  assertEquals(2, s.nextStreamId(map));
  assertEquals(4, s.nextStreamId(map));
  s = new StreamIdSupplier(Integer.MAX_VALUE - 2);
  assertEquals(2147483647, s.nextStreamId(map));
  assertEquals(1, s.nextStreamId(map));
  assertEquals(3, s.nextStreamId(map));
}