Buffer[] requestedBuffers = new Buffer[NUM_BUFFERS];
for (int i = 0; i < NUM_BUFFERS; i++) {
requestedBuffers[i] = bufferPool.requestBuffer(BUFFER_SIZE);
}
BufferAvailabilityRegistration registration;
// --------------------------------------------------------------------
// 1. success
// --------------------------------------------------------------------
registration = bufferPool.registerBufferAvailabilityListener(listener);
Assert.assertEquals(BufferAvailabilityRegistration.SUCCEEDED_REGISTERED, registration);