// Path: jnetrobust-core/src/main/java/com/github/mucaho/jnetrobust/util/SystemClock.java
// public interface SystemClock {
//     long getTimeNow();
// }
// 
// 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 com.github.mucaho.jnetrobust.util.SystemClock;
import junitparams.JUnitParamsRunner;
import junitparams.Parameters;
import mockit.Deencapsulation;
import mockit.Mock;
import mockit.MockUp;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.LinkedHashSet;
import static com.github.mucaho.jarrayliterals.ArrayShortcuts.$;
import static com.github.mucaho.jarrayliterals.ArrayShortcuts.$S;
import static org.junit.Assert.*;
/*
 * 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 ReceivedMapControlTest extends AbstractMapControlTest {
    protected static ReceivedMapControl handler = new ReceivedMapControl((short) 0, null,
            config.getPacketQueueLimit(), config.getPacketOffsetLimit(), config.getPacketRetransmitLimit() + 1,
            config.getPacketQueueTimeout(), new SystemClock() {
        @Override
        public long getTimeNow() {
            return System.currentTimeMillis();
        }
    });

    static {
        System.setProperty("jmockit-mockParameters", "annotated");
    }

    @BeforeClass
    public static void initMap() {
        initDataMap(handler);
        dataId = 0;
        Deencapsulation.setField(handler, "nextDataId", (short) 1);
        dataMap.clear();
    }


    public Object[][] parametersForTestRemoveTail() {
        Object[][] out = (Object[][])
                $($(
// Path: jnetrobust-core/src/main/java/com/github/mucaho/jnetrobust/util/SystemClock.java
// public interface SystemClock {
//     long getTimeNow();
// }
// 
// 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/ReceivedMapControlTest.java
import com.github.mucaho.jnetrobust.util.SystemClock;
import junitparams.JUnitParamsRunner;
import junitparams.Parameters;
import mockit.Deencapsulation;
import mockit.Mock;
import mockit.MockUp;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.LinkedHashSet;
import static com.github.mucaho.jarrayliterals.ArrayShortcuts.$;
import static com.github.mucaho.jarrayliterals.ArrayShortcuts.$S;
import static org.junit.Assert.*;

/*
 * 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 ReceivedMapControlTest extends AbstractMapControlTest {
    protected static ReceivedMapControl handler = new ReceivedMapControl((short) 0, null,
            config.getPacketQueueLimit(), config.getPacketOffsetLimit(), config.getPacketRetransmitLimit() + 1,
            config.getPacketQueueTimeout(), new SystemClock() {
        @Override
        public long getTimeNow() {
            return System.currentTimeMillis();
        }
    });

    static {
        System.setProperty("jmockit-mockParameters", "annotated");
    }

    @BeforeClass
    public static void initMap() {
        initDataMap(handler);
        dataId = 0;
        Deencapsulation.setField(handler, "nextDataId", (short) 1);
        dataMap.clear();
    }


    public Object[][] parametersForTestRemoveTail() {
        Object[][] out = (Object[][])
                $($(
                        (short) 3, $S, (short) 1