function test_clean_log()
  {
    $this->stats_register->set_register_time(time());
    $this->stats_register->register($node_id = 1, 'test', REQUEST_STATUS_SUCCESS);

    $this->stats_register->set_register_time(time() + 2*60*60*24);
    $this->stats_register->register($node_id = 1, 'test', REQUEST_STATUS_SUCCESS);

    $this->stats_register->set_register_time(time() + 3*60*60*24);
    $this->stats_register->register($node_id = 1, 'test', REQUEST_STATUS_SUCCESS);

    $this->stats_register->set_register_time(time() + 4*60*60*24);
    $this->stats_register->register($node_id = 1, 'test', REQUEST_STATUS_SUCCESS);

    $this->stats_register->set_register_time(time() + 5*60*60*24);
    $this->stats_register->register($node_id = 1, 'test', REQUEST_STATUS_SUCCESS);

    $this->stats_register->set_register_time(time() + 6*60*60*24);
    $this->stats_register->register($node_id = 1, 'test', REQUEST_STATUS_SUCCESS);

    $date = new date();
    $date->set_by_stamp(time() + 4*60*60*24 - 10);
    $this->stats_register->clean_until($date);

    $this->assertEqual(3, $this->stats_register->count_log_records());
  }