Code example for HttpTransportMetricsImpl

    public void testCodingCompleted() throws Exception { 
        final WritableByteChannelMock channel = new WritableByteChannelMock(64);
        final SessionOutputBuffer outbuf = new SessionOutputBufferImpl(1024, 128);
        final HttpTransportMetricsImpl metrics = new HttpTransportMetricsImpl();
        final LengthDelimitedEncoder encoder = new LengthDelimitedEncoder(
                channel, outbuf, metrics, 5);
        try { 
            encoder.write(CodecTestUtils.wrap("more stuff"));
  "IllegalStateException should have been thrown");
        } catch (final IllegalStateException ex) {
            // ignore 
Connect your IDE to all the code out there  Get Codota for Java