### Question:
Vector2 extends AVector2 { public Vector2 multiply(final double factor) { setX(x() * factor); setY(y() * factor); return this; } protected  Vector2(); protected  Vector2(final double x, final double y); protected  Vector2(final IVector original); static Vector2 zero(); static Vector2 fromX(final double x); static Vector2 fromY(final double y); static Vector2 fromXY(final double x, final double y); static Vector2 fromAngle(final double angle); static Vector2 fromAngleLength(final double angle, final double length); static Vector2 fromPoints(final IVector2 start, final IVector2 end); static Vector2 copy(final IVector original); static Vector2 fromReal(final RealVector vector); @Override Vector2 copy(); Vector2 set(final IVector original); Vector2 setX(final double x); Vector2 setY(final double y); void set(final int i, final double value); Vector2 add(final IVector vector); Vector2 subtract(final IVector vector); Vector2 multiply(final double factor); Vector2 scaleTo(final double newLength); Vector2 turn(final double angle); Vector2 turnTo(final double angle); Vector2 normalize(); @Override Vector2 getXYVector(); @Override double x(); @Override double y();  }### Answer:
@Test public void testMultiply() { Vector2 vec1 = Vector2.fromXY(4, 7); double factor = 4.5; vec1.multiply(factor); assertEquals(Vector2.fromXY(18, 31.5), vec1); vec1 = Vector2.fromXY(1, 1); factor = AngleMath.PI; vec1.multiply(factor); assertEquals(vec1.x(), factor, ACCURACY); assertEquals(vec1.y(), factor, ACCURACY); vec1 = Vector2.fromXY(3, -5); factor = -2.1f; vec1.multiply(factor); assertEquals(vec1.x(), -6.3f, ACCURACY); assertEquals(vec1.y(), 10.5, ACCURACY); factor = 0; vec1.multiply(factor); assertThat(Vector2.fromXY(0, 0).isCloseTo(vec1)).isTrue(); }