@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 testUpdateForPatrollingRight() {
    skeleton.patrollingLeft = false;
    skeleton.setPosition(50);
    skeleton.update();
    assertEquals(51, skeleton.getPosition());
  }