### Question:
Streams { public Stream openStream( final boolean client, final boolean bidirectional, final StreamListener handler) { final StreamType type = bidirectional ? StreamType.Bidirectional : StreamType.Sending; final long streamId = StreamId.next(maxId, client, bidirectional); this.maxId = streamId; final DefaultStream stream = new DefaultStream(streamId, frameSender, handler, type); streams.put(streamId, stream); return stream; } Streams(final FrameSender frameSender); Stream openStream(
      final boolean client, final boolean bidirectional, final StreamListener handler); DefaultStream getOrCreate(final long streamId, final StreamListener handler); void onAck(final long pn);  }### Answer:
@Test public void openStream() { final Stream stream = streams.openStream(false, false, listener); assertEquals(3, stream.getId()); }