AgentMotion implements Serializable, Cloneable { @Pure @Override public AgentMotion clone() { try { final AgentMotion clone = (AgentMotion) super.clone(); clone.linear = this.linear.clone(); return clone; } catch (CloneNotSupportedException e) { throw new Error(e); } } AgentMotion();  AgentMotion(AgentMotion outputToCopy);  AgentMotion(double angularMotion);  AgentMotion(double linearx, double lineary);  AgentMotion(double linearx, double lineary, double angularMotion);  AgentMotion(Vector2D<?, ?> linearMotion);  AgentMotion(Vector2D<?, ?> linearMotion, double angularMotion); @Pure @ScalaOperator("-") AgentMotion minus(AgentMotion motion); @Pure @ScalaOperator("-") AgentMotion minus(double motion); @Pure @ScalaOperator("-") AgentMotion minus(Vector2D<?, ?> motion); @Pure @ScalaOperator("+") AgentMotion plus(AgentMotion motion); @Pure @ScalaOperator("+") AgentMotion plus(double motion); @Pure @ScalaOperator("+") AgentMotion plus(Vector2D<?, ?> motion); @Pure @Override AgentMotion clone(); @Pure @Override boolean equals(Object obj); @Pure double getAngular(); @Pure Vector2D<?, ?> getLinear(); @Pure @Override int hashCode(); @Pure @XtextOperator("+=") void operator_add(AgentMotion motion); @Pure @XtextOperator("+=") void operator_add(double motion); @Pure @XtextOperator("+=") void operator_add(Vector2D<?, ?> motion); @Pure @XtextOperator("-") AgentMotion operator_minus(AgentMotion motion); @Pure @XtextOperator("-") AgentMotion operator_minus(double motion); @Pure @XtextOperator("-") AgentMotion operator_minus(Vector2D<?, ?> motion); @Pure @XtextOperator("+") AgentMotion operator_plus(AgentMotion motion); @Pure @XtextOperator("+") AgentMotion operator_plus(double motion); @Pure @XtextOperator("+") AgentMotion operator_plus(Vector2D<?, ?> motion); @Pure @XtextOperator("-=") void operator_remove(AgentMotion motion); @Pure @XtextOperator("-=") void operator_remove(double motion); @Pure @XtextOperator("-=") void operator_remove(Vector2D<?, ?> motion); void set(AgentMotion motionToCopy); void setAngular(AgentMotion motionToCopy); void setAngular(double angular); void setLinear(AgentMotion motionToCopy); void setLinear(double dx, double dy); void setLinear(Vector2D<?, ?> linear); @Pure @Override String toString();  }
@Test public void testClone() { double x = getRandom().nextDouble(); double y = getRandom().nextDouble(); double r = getRandom().nextDouble(); AgentMotion m = new AgentMotion(x, y, r); AgentMotion clone = m.clone(); assertFpVectorEquals(x, y, clone.getLinear()); assertEpsilonEquals(r, clone.getAngular()); }