// Path: src/test/java/com/eatthepath/jvptree/IntegerDistanceFunction.java
// public class IntegerDistanceFunction implements DistanceFunction<Number> {
// 
//     public double getDistance(final Number firstPoint, final Number secondPoint) {
//         return Math.abs(firstPoint.intValue() - secondPoint.intValue());
//     }
// }


import java.util.ArrayList;
import java.util.List;
import com.eatthepath.jvptree.IntegerDistanceFunction;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
package com.eatthepath.jvptree.util;




public class MedianDistanceThresholdSelectionStrategyTest {

    @Test
    void testSelectThreshold() {
        final MedianDistanceThresholdSelectionStrategy<Number, Integer> strategy =
                new MedianDistanceThresholdSelectionStrategy<>();

        {
            final List<Integer> singleIntegerList = new ArrayList<>();
            singleIntegerList.add(7);

// Path: src/test/java/com/eatthepath/jvptree/IntegerDistanceFunction.java
// public class IntegerDistanceFunction implements DistanceFunction<Number> {
// 
//     public double getDistance(final Number firstPoint, final Number secondPoint) {
//         return Math.abs(firstPoint.intValue() - secondPoint.intValue());
//     }
// }


// Path: src/test/java/com/eatthepath/jvptree/util/MedianDistanceThresholdSelectionStrategyTest.java
import java.util.ArrayList;
import java.util.List;
import com.eatthepath.jvptree.IntegerDistanceFunction;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;

package com.eatthepath.jvptree.util;




public class MedianDistanceThresholdSelectionStrategyTest {

    @Test
    void testSelectThreshold() {
        final MedianDistanceThresholdSelectionStrategy<Number, Integer> strategy =
                new MedianDistanceThresholdSelectionStrategy<>();

        {
            final List<Integer> singleIntegerList = new ArrayList<>();
            singleIntegerList.add(7);

            assertEquals(7, (int)strategy.selectThreshold(singleIntegerList, 0, new IntegerDistanceFunction()));