public RestLiAttachmentReader(final MultiPartMIMEReader multiPartMIMEReader)
  {
    _multiPartMIMEReader = multiPartMIMEReader;
  }
@Test
  public void testRestLiAttachmentReader()
  {
    //Create a mock MultiPartMIMEReader and pass to the RestLiAttachmentReader. Verify that API calls are propagated accordingly.
    final MultiPartMIMEReader multiPartMIMEReader = mock(MultiPartMIMEReader.class);
    final RestLiAttachmentReader attachmentReader = new RestLiAttachmentReader(multiPartMIMEReader);
    attachmentReader.drainAllAttachments();
    attachmentReader.haveAllAttachmentsFinished();

    final RestLiAttachmentReaderCallback dummyCallback = new RestLiAttachmentReaderCallback()
    {
      //None of these should be called.
      @Override
      public void onNewAttachment(RestLiAttachmentReader.SingleRestLiAttachmentReader singleRestLiAttachmentReader)
      {
        Assert.fail();
      }

      @Override
      public void onFinished()
      {
        Assert.fail();
      }

      @Override
      public void onDrainComplete()
      {
        Assert.fail();
      }

      @Override
      public void onStreamError(Throwable throwable)
      {
        Assert.fail();
      }
    };

    attachmentReader.registerAttachmentReaderCallback(dummyCallback);

    //Verify the calls above made it correctly to the layer below
    verify(multiPartMIMEReader, times(1)).drainAllParts();
    verify(multiPartMIMEReader, times(1)).haveAllPartsFinished();
    verify(multiPartMIMEReader, times(1)).registerReaderCallback(isA(MultiPartMIMEReaderCallback.class));
    verifyNoMoreInteractions(multiPartMIMEReader);
  }