@Test(expected = IllegalStateException.class)
public void testAddBufferFull() throws IOException, TransportException {

  S3TransportSerializer serializer = mock(S3TransportSerializer.class);
  doReturn("foo".getBytes()).when(serializer).serialize(any(InternalEvent.class));
  S3TransportBuffer buffer = new S3TransportBuffer(5, false, serializer);
  InternalEvent mockEvent = mock(InternalEvent.class);
  buffer.add(mockEvent);
  buffer.add(mockEvent);
}