public class TestDiskQueue {
@Test
public void basicTest() throws Exception{
DiskQueue d = DiskQueue.getInstance("test.fix");
d.offer("hello world");
d.offer("hello world");
d.close();
DiskQueue e = DiskQueue.getInstance("test.fix");
out.println("BEFORE========");
for(String s : e){
out.println(s);
}
e.offer("world hello");
e.offer("world hello");
out.println("AFTER========");
for(String s : e){
out.println(s);
}
e.close();
}