@Override
  public void update() {
    if (patrollingLeft) {
      position -= 1;
      if (position == PATROLLING_LEFT_BOUNDING) {
        patrollingLeft = false;
      }
    } else {
      position += 1;
      if (position == PATROLLING_RIGHT_BOUNDING) {
        patrollingLeft = true;
      }
    }
    logger.info("Skeleton {} is on position {}.", id, position);
  }
@Test
  void testUpdateForReverseDirectionFromLeftToRight() {
    skeleton.patrollingLeft = true;
    skeleton.setPosition(1);
    skeleton.update();
    assertEquals(0, skeleton.getPosition());
    assertFalse(skeleton.patrollingLeft);
  }