@Test(expected = BufferOverflowException.class)
public void allocate() {

  int size = 11 * 1024 * 1024;
  byte[] expectedBytes = new byte[size];
  random.nextBytes(expectedBytes);
  buffer.allocate(expectedBytes);
}