UnitVectorProperty extends SimpleObjectProperty<Vector2dfx> { @Override public Vector2dfx get() { if (isBound()) { return super.get(); } if (this.fake == null) { this.fake = getGeomFactory().newVector(); final DoubleProperty x = new SimpleDoubleProperty(this.fake, MathFXAttributeNames.X); x.bind(internalXProperty()); final DoubleProperty y = new SimpleDoubleProperty(this.fake, MathFXAttributeNames.Y); y.bind(internalYProperty()); this.fake.set(x, y); } return this.fake; } UnitVectorProperty(Object bean, String name, GeomFactory2dfx factory); GeomFactory2dfx getGeomFactory(); @Override Vector2dfx get(); @Override void set(Vector2dfx newValue); void set(double x, double y); double getX(); double getY(); @Pure ReadOnlyDoubleProperty xProperty(); @Pure ReadOnlyDoubleProperty yProperty();  }
@Test public void get() { Vector2D v = this.property.get(); assertNotNull(v); assertEpsilonEquals(ux, v.getX()); assertEpsilonEquals(uy, v.getY()); }