### Question:
ApplicationThreadDeframer implements Deframer, MessageDeframer.Listener { @Override public void request(final int numMessages) { storedListener.messagesAvailable( new InitializingMessageProducer( new Runnable() { @Override public void run() { if (deframer.isClosed()) { return; } try { deframer.request(numMessages); } catch (Throwable t) { storedListener.deframeFailed(t); deframer.close(); } } })); } ApplicationThreadDeframer(
      MessageDeframer.Listener listener,
      TransportExecutor transportExecutor,
      MessageDeframer deframer); @Override void setMaxInboundMessageSize(int messageSize); @Override void setDecompressor(Decompressor decompressor); @Override void setFullStreamDecompressor(GzipInflatingBuffer fullStreamDecompressor); @Override void request(final int numMessages); @Override void deframe(final ReadableBuffer data); @Override void closeWhenComplete(); @Override void close(); @Override void bytesRead(final int numBytes); @Override void messagesAvailable(StreamListener.MessageProducer producer); @Override void deframerClosed(final boolean hasPartialMessage); @Override void deframeFailed(final Throwable cause);  }### Answer:
@Test public void requestInvokesMessagesAvailableOnListener() { applicationThreadDeframer.request(1); verifyZeroInteractions(mockDeframer); listener.runStoredProducer(); verify(mockDeframer).request(1); }