### Question:
Actor extends WorldObject { @Override public void update() { super.update(); ActorUtils.stepForward(this); } Actor(String name); @Override void preUpdate(); @Override void update(); MoveState getForcedState(); void setForcedState(MoveState forcedState); double getMoveSpeed(); void setMoveSpeed(double moveSpeed); static double DEFAULT_MOVE_SPEED; }### Answer:
@Test public void testReset() { Actor actor = new Actor("Actor"); world.getWorldObjects().add(actor); world.update(); Angle angle = new Angle(0.0, Angle.FRONT); actor.setAngle(angle); actor.postUpdate(); EventStack stack = actor.getEventStack(StateChangeStack.STACK_NAME); Assert.assertNotNull(stack); Assert.assertTrue(stack instanceof StateChangeStack); Assert.assertEquals(((StateChangeStack) stack).getStateChanges().get(1).angle, angle); }
@Test public void testStepToNullLocation() throws InterruptedException { Actor actor = new Actor("Actor"); world.getWorldObjects().add(actor); world.update(); Angle angle = new Angle(0.0, Angle.BACK); actor.setAngle(angle); world.update(); Thread.sleep(1000); world.update(); double distance = Vector2D.ORIGIN.getDistanceToVector(actor.getVector2D()); Assert.assertEquals(distance, 0, 0.1); }