@Test
public void testEmptyBuffer() throws IOException {

  GenericTransportSerializer serializer = mock(GenericTransportSerializer.class);
  doReturn("foo".getBytes()).when(serializer).serialize(any(InternalEvent.class));
  GenericTransportBuffer buffer = new GenericTransportBuffer(1, false, serializer);
  assertEquals(true, buffer.isEmpty());
}