    @Test
    public void testGetNearNeighborsInSampleInvalid() {

        assertThrows(NullPointerException.class, () -> forest.getNearNeighborsInSample(null, 101.1));
        assertThrows(IllegalArgumentException.class,
                () -> forest.getNearNeighborsInSample(new double[] { 1.1, 2.2 }, -101.1));
        assertThrows(IllegalArgumentException.class,
                () -> forest.getNearNeighborsInSample(new double[] { 1.1, 2.2 }, 0.0));
    }