// Path: jnetrobust-core/src/main/java/com/github/mucaho/jnetrobust/util/EntryIterator.java
// public interface EntryIterator<K, V> {
// 
//     /**
//      * Returns the next key higher than the current key.
//      *
//      * @param currentKey the current key to be used in the lookup of the higher key
//      *                   or null to retrieve the first key
//      * @return <K> the next key higher than the current key or the first key
//      * or null if there is no higher key
//      */
//     K getHigherKey(K currentKey);
// 
//     /**
//      * Returns the next key lower than the current key.
//      *
//      * @param currentKey the current key to be used in the lookup of the lower key
//      *                   or null to retrieve the last key
//      * @return <K> the previous key lower than the current key or the last key
//      * or null if there is no lower key
//      */
//     K getLowerKey(K currentKey);
// 
//     /**
//      * Returns the value at the current key.
//      *
//      * @param currentKey the current key that is mapped to the returned value
//      * @return <V> the value bound to the current key
//      */
//     V getValue(K currentKey);
// 
//     /**
//      * Removes the mapping the current key.
//      *
//      * @param currentKey the current key that is to be removed
//      * @return <V> the value bound to the current key
//      */
//     V removeValue(K currentKey);
// }
// 
// Path: jnetrobust-core/src/test/java/com/github/mucaho/jarrayliterals/ArrayShortcuts.java
// public static <T> Object $(T param) {
//     return createArray(getClass(param), param);
// }
// 
// Path: jnetrobust-core/src/test/java/com/github/mucaho/jarrayliterals/ArrayShortcuts.java
// public static Object $S(int... params) {
//     Short[] out = new Short[params.length];
//     for (int i = 0; i < out.length; ++i) {
//         out[i] = (short) params[i];
//     }
//     return out;
// }


import junitparams.JUnitParamsRunner;
import junitparams.Parameters;
import com.github.mucaho.jnetrobust.util.EntryIterator;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.nio.ByteBuffer;
import java.util.*;
import static com.github.mucaho.jarrayliterals.ArrayShortcuts.$;
import static com.github.mucaho.jarrayliterals.ArrayShortcuts.$S;
import static org.junit.Assert.assertEquals;
/*
 * Copyright (c) 2014 mucaho (https://github.com/mucaho).
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

package com.github.mucaho.jnetrobust.control;




@RunWith(JUnitParamsRunner.class)
public class SentSegmentMapIterTest {
    private static short dataId = Short.MIN_VALUE;

    protected static ByteBuffer serializeShorts(Short[] numbers) {
        ByteBuffer buffer = ByteBuffer.allocate(Integer.SIZE / Byte.SIZE + numbers.length * Short.SIZE / Byte.SIZE);
        buffer.putInt(numbers.length);
        for (short number : numbers) buffer.putShort(number);
        buffer.flip();
        return buffer;
    }

    protected static Short[] deserializeShorts(ByteBuffer data) {
        int size = data.getInt();
        Short[] numbers = new Short[size];
        for (int i = 0; i < size; ++i) {
            numbers[i] = data.getShort();
        }
        return numbers;
    }

    public Object[][] parametersForTestIterator() {
        Object[][] out = (Object[][])
                $($(
// Path: jnetrobust-core/src/main/java/com/github/mucaho/jnetrobust/util/EntryIterator.java
// public interface EntryIterator<K, V> {
// 
//     /**
//      * Returns the next key higher than the current key.
//      *
//      * @param currentKey the current key to be used in the lookup of the higher key
//      *                   or null to retrieve the first key
//      * @return <K> the next key higher than the current key or the first key
//      * or null if there is no higher key
//      */
//     K getHigherKey(K currentKey);
// 
//     /**
//      * Returns the next key lower than the current key.
//      *
//      * @param currentKey the current key to be used in the lookup of the lower key
//      *                   or null to retrieve the last key
//      * @return <K> the previous key lower than the current key or the last key
//      * or null if there is no lower key
//      */
//     K getLowerKey(K currentKey);
// 
//     /**
//      * Returns the value at the current key.
//      *
//      * @param currentKey the current key that is mapped to the returned value
//      * @return <V> the value bound to the current key
//      */
//     V getValue(K currentKey);
// 
//     /**
//      * Removes the mapping the current key.
//      *
//      * @param currentKey the current key that is to be removed
//      * @return <V> the value bound to the current key
//      */
//     V removeValue(K currentKey);
// }
// 
// Path: jnetrobust-core/src/test/java/com/github/mucaho/jarrayliterals/ArrayShortcuts.java
// public static <T> Object $(T param) {
//     return createArray(getClass(param), param);
// }
// 
// Path: jnetrobust-core/src/test/java/com/github/mucaho/jarrayliterals/ArrayShortcuts.java
// public static Object $S(int... params) {
//     Short[] out = new Short[params.length];
//     for (int i = 0; i < out.length; ++i) {
//         out[i] = (short) params[i];
//     }
//     return out;
// }


// Path: jnetrobust-core/src/test/java/com/github/mucaho/jnetrobust/control/SentSegmentMapIterTest.java
import junitparams.JUnitParamsRunner;
import junitparams.Parameters;
import com.github.mucaho.jnetrobust.util.EntryIterator;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.nio.ByteBuffer;
import java.util.*;
import static com.github.mucaho.jarrayliterals.ArrayShortcuts.$;
import static com.github.mucaho.jarrayliterals.ArrayShortcuts.$S;
import static org.junit.Assert.assertEquals;

/*
 * Copyright (c) 2014 mucaho (https://github.com/mucaho).
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

package com.github.mucaho.jnetrobust.control;




@RunWith(JUnitParamsRunner.class)
public class SentSegmentMapIterTest {
    private static short dataId = Short.MIN_VALUE;

    protected static ByteBuffer serializeShorts(Short[] numbers) {
        ByteBuffer buffer = ByteBuffer.allocate(Integer.SIZE / Byte.SIZE + numbers.length * Short.SIZE / Byte.SIZE);
        buffer.putInt(numbers.length);
        for (short number : numbers) buffer.putShort(number);
        buffer.flip();
        return buffer;
    }

    protected static Short[] deserializeShorts(ByteBuffer data) {
        int size = data.getInt();
        Short[] numbers = new Short[size];
        for (int i = 0; i < size; ++i) {
            numbers[i] = data.getShort();
        }
        return numbers;
    }

    public Object[][] parametersForTestIterator() {
        Object[][] out = (Object[][])
                $($(
                        $($S(1, 2, 3), $S(4, 5), $S(7, 9), $S(8, 10))