### Question:
Vector3 extends AVector3 { public Vector3 apply(final Function<Double, Double> function) { x = function.apply(x); y = function.apply(y); z = function.apply(z); return this; } @SuppressWarnings("unused") private  Vector3(); private  Vector3(final double x, final double y, final double z); private  Vector3(final IVector3 original); static IVector3 valueOf(final String value); static Vector3 zero(); static Vector3 fromXYZ(final double x, final double y, final double z); static Vector3 fromXY(final double x, final double y); static Vector3 from2d(final IVector2 xy, final double z); static Vector3 copy(final IVector3 original); static Vector3 fromArray(final double[] arr); static Vector3 fromProjection(final IVector3 origin, final IVector2 ground, final double height); @Override IVector3 copy(); void set(final IVector2 xy, final double z); void set(final IVector3 xyz); void setXY(final IVector2 xy); void set(final int i, final double value); Vector3 add(final IVector3 vector); Vector3 subtract(final IVector3 vector); Vector3 multiply(final double f); Vector3 apply(final Function<Double, Double> function); @Override Vector3 getXYZVector(); @Override double x(); @Override double y(); @Override double z();  }### Answer:
@Test public void testApply() { assertThat(Vector3.fromXYZ(1, -2, 3).apply(v -> Math.abs(v * 3))).isEqualTo(Vector3.fromXYZ(3, 6, 9)); }