I am having trouble with passing tests for my IllegalArgumentException. When no object is passed into my method, the IllegalArgumentException will not happen.
public double distanceTo(Point otherPoint) {
    int x = (otherPoint.x - this.x);
    int y = (otherPoint.y - this.y);
    double xDbl = Math.pow(x, 2);
    double yDbl = Math.pow(y, 2);
    if (otherPoint!=null) {
        return Math.hypot(xDbl,yDbl);
    } else {
        throw new IllegalArgumentException("No value for otherPoint object");
    }
}
 
    