### Question:
ByteBufferPool implements AlarmListener { public ByteBuffer alloc( Notify notify ) throws IOException { synchronized (saved) { if (!history.used( 1 )) { if (notify == null) throw new IOException( "out of buffers" ); register( notify ); return null; } try { return allocBuf(); } catch ( Error e ) { history.used( -1 ); throw e; } catch ( RuntimeException e ) { history.used( -1 ); throw e; } } } ByteBufferPool( int bufferSize, int min, int limit,
		int interval, int length ); int bufferSize(); int min(); int limit(); int interval(); int length(); ByteBuffer alloc( Notify notify ); ByteBuffer[] alloc( Notify notify, int count ); void release( ByteBuffer buf ); void release( ByteBuffer[] bufs ); void register( Notify notify ); void unregister( Notify notify ); int wakeup( AlarmManager manager, Object state, long due ); void shutdown(); int used();  }### Answer:
@Test( expected = IOException.class ) public void alloc4() throws Exception { ByteBufferPool p = new ByteBufferPool( 1024, 0, 1, 0, 0 ); p.alloc( null ); p.alloc( null ); }