// Path: src/main/java/com/orange/dgil/trail/core/common/TrailPoint.java
// @Getter
// @NoArgsConstructor
// public class TrailPoint {
//   private int x = -1;
//   private int y = -1;
// 
//   public TrailPoint(int x, int y) {
//     set(x, y);
//   }
// 
//   public void set(int x, int y) {
//     this.x = x;
//     this.y = y;
//   }
// 
//   public boolean isSameAs(TrailPoint point) {
//     return x == point.x && y == point.y;
//   }
// 
//   public double getDistanceTo(TrailPoint point) {
//     int dx = x - point.getX();
//     int dy = y - point.getY();
//     return Math.sqrt(dx * dx + dy * dy);
//   }
// 
//   public void deepCopy(TrailPoint point) {
//     x = point.x;
//     y = point.y;
//   }
// }


import com.orange.dgil.trail.core.common.TrailPoint;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
    try {
      slidingWindow.getY(0);
    } catch (SlidingWindowIndexException e) {
      getException = true;
    }
    // then
    Assert.assertTrue(getException);
  }

  @Test
  public void shouldGetYWhenNegativeIndex() throws IllegalAccessException {
    // given
    int windowSize = 3;
    slidingWindow = new SlidingWindow(windowSize);
    // do
    boolean getException = false;
    try {
      slidingWindow.getY(-1);
    } catch (SlidingWindowIndexException e) {
      getException = true;
    }
    // then
    Assert.assertTrue(getException);
  }

  @Test
  public void shouldGetYWhenPointsAndIndexOk() throws IllegalAccessException {
    // given
    int windowSize = 3;
    slidingWindow = new SlidingWindow(windowSize);
// Path: src/main/java/com/orange/dgil/trail/core/common/TrailPoint.java
// @Getter
// @NoArgsConstructor
// public class TrailPoint {
//   private int x = -1;
//   private int y = -1;
// 
//   public TrailPoint(int x, int y) {
//     set(x, y);
//   }
// 
//   public void set(int x, int y) {
//     this.x = x;
//     this.y = y;
//   }
// 
//   public boolean isSameAs(TrailPoint point) {
//     return x == point.x && y == point.y;
//   }
// 
//   public double getDistanceTo(TrailPoint point) {
//     int dx = x - point.getX();
//     int dy = y - point.getY();
//     return Math.sqrt(dx * dx + dy * dy);
//   }
// 
//   public void deepCopy(TrailPoint point) {
//     x = point.x;
//     y = point.y;
//   }
// }


// Path: src/test/java/com/orange/dgil/trail/core/vecto/SlidingWindowGetXYIsIndexValidGetMaxIndexTest.java
import com.orange.dgil.trail.core.common.TrailPoint;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;

    try {
      slidingWindow.getY(0);
    } catch (SlidingWindowIndexException e) {
      getException = true;
    }
    // then
    Assert.assertTrue(getException);
  }

  @Test
  public void shouldGetYWhenNegativeIndex() throws IllegalAccessException {
    // given
    int windowSize = 3;
    slidingWindow = new SlidingWindow(windowSize);
    // do
    boolean getException = false;
    try {
      slidingWindow.getY(-1);
    } catch (SlidingWindowIndexException e) {
      getException = true;
    }
    // then
    Assert.assertTrue(getException);
  }

  @Test
  public void shouldGetYWhenPointsAndIndexOk() throws IllegalAccessException {
    // given
    int windowSize = 3;
    slidingWindow = new SlidingWindow(windowSize);
    TrailPoint point = new TrailPoint();