1
2
3
4
5
6
7
8
9
10
11
12 package com.octo.captcha.engine.bufferedengine.buffer;
13
14 import java.util.NoSuchElementException;
15
16 import org.apache.commons.collections.buffer.UnboundedFifoBuffer;
17
18
19 public class MemoryCaptchaBufferTest extends CaptchaBufferTestAbstract {
20
21 /***
22 * @see com.octo.captcha.engine.bufferedengine.buffer.CaptchaBufferTestAbstract#getBuffer()
23 */
24 public CaptchaBuffer getBuffer() {
25 return new MemoryCaptchaBuffer();
26 }
27
28 public void testRemoveEmptyBuffer() {
29 UnboundedFifoBuffer fifoBuffer = new UnboundedFifoBuffer();
30 try {
31 fifoBuffer.remove();
32 fail("should throw an Exception");
33 } catch (NoSuchElementException e) {
34 }
35 }
36 }