AbstractClientStream extends AbstractStream<IdT> implements ClientStream { @Override public void start(ClientStreamListener listener) { checkState(this.listener == null, "stream already started"); this.listener = checkNotNull(listener, "listener"); } protected  AbstractClientStream(WritableBufferAllocator bufferAllocator,
                                 int maxMessageSize); @Override void start(ClientStreamListener listener); void transportReportStatus(final Status newStatus, boolean stopDelivery,
      final Metadata trailers); @Override final void halfClose(); @Override final void cancel(Status reason); @Override final boolean isReady(); @Override boolean isClosed();  }
@Test public void startFailsOnNullListener() { AbstractClientStream<Integer> stream = new BaseAbstractClientStream<Integer>(allocator); thrown.expect(NullPointerException.class); stream.start(null); }
@Test public void cantCallStartTwice() { AbstractClientStream<Integer> stream = new BaseAbstractClientStream<Integer>(allocator); stream.start(mockListener); thrown.expect(IllegalStateException.class); stream.start(mockListener); }