// Path: src/test/java/org/sharedmq/test/CommonTests.java
// public interface CommonTests {
// }
// 
// Path: src/test/java/org/sharedmq/test/TestFolder.java
// public class TestFolder implements Closeable {
// 
//     private final File root;
// 
//     /**
//      * Creates an new folder in the default temporary-file directory.
//      *
//      * @param prefix The prefix for the new folder name.
//      * @param suffix The suffix for the new folder name.
//      * @throws IOException If folder creation fails.
//      */
//     public TestFolder(String prefix, String suffix) throws IOException {
//         root = File.createTempFile(prefix, suffix);
//         if (!root.delete() || !root.mkdir()) {
//             throw new IOException("Failed to prepare test folder.");
//         }
//     }
// 
//     /**
//      * Returns a {@link File} object matching this folder location.
//      */
//     public File getRoot() {
//         return root;
//     }
// 
//     /**
//      * Returns an {@link File} instance for the file with the given name in this test folder.
//      *
//      * @param filename The name of the faile.
//      */
//     public File getFile(String filename) {
//         return new File(root, filename);
//     }
// 
//     /**
//      * Deletes this test folder and all its content.
//      *
//      * @throws IOException
//      */
//     @Override
//     public void close() throws IOException {
// 
//         // A mapped byte buffer and the file mapping that it represents
//         // remain valid until the buffer itself is garbage-collected.
//         System.gc();
// 
//         IOUtils.deleteTree(root);
//     }
// }


import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.sharedmq.test.CommonTests;
import org.sharedmq.test.TestFolder;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
package org.sharedmq.primitives;




@Category(CommonTests.class)
public class MappedHeapTest {
    @Test
    public void testAddPeekAndPoll() throws IOException {
// Path: src/test/java/org/sharedmq/test/CommonTests.java
// public interface CommonTests {
// }
// 
// Path: src/test/java/org/sharedmq/test/TestFolder.java
// public class TestFolder implements Closeable {
// 
//     private final File root;
// 
//     /**
//      * Creates an new folder in the default temporary-file directory.
//      *
//      * @param prefix The prefix for the new folder name.
//      * @param suffix The suffix for the new folder name.
//      * @throws IOException If folder creation fails.
//      */
//     public TestFolder(String prefix, String suffix) throws IOException {
//         root = File.createTempFile(prefix, suffix);
//         if (!root.delete() || !root.mkdir()) {
//             throw new IOException("Failed to prepare test folder.");
//         }
//     }
// 
//     /**
//      * Returns a {@link File} object matching this folder location.
//      */
//     public File getRoot() {
//         return root;
//     }
// 
//     /**
//      * Returns an {@link File} instance for the file with the given name in this test folder.
//      *
//      * @param filename The name of the faile.
//      */
//     public File getFile(String filename) {
//         return new File(root, filename);
//     }
// 
//     /**
//      * Deletes this test folder and all its content.
//      *
//      * @throws IOException
//      */
//     @Override
//     public void close() throws IOException {
// 
//         // A mapped byte buffer and the file mapping that it represents
//         // remain valid until the buffer itself is garbage-collected.
//         System.gc();
// 
//         IOUtils.deleteTree(root);
//     }
// }


// Path: src/test/java/org/sharedmq/primitives/MappedHeapTest.java
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.sharedmq.test.CommonTests;
import org.sharedmq.test.TestFolder;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;

package org.sharedmq.primitives;




@Category(CommonTests.class)
public class MappedHeapTest {
    @Test
    public void testAddPeekAndPoll() throws IOException {
        try (TestFolder testFolder = new TestFolder("MappedHeapTest", "testAddPeekAndPoll")) {