public function test()
 {
     require_once 'RealEstateAgency/GlobalData.php';
     $globalData = new RealEstateAgency_GlobalData();
     $object = new RealEstateAgency_Object_RealEstateObject();
     $object->setGlobalData($globalData);
     $object->setObjectID(NULL);
     $object->setBrokerID(1);
     $object->setDateOfStart(tools_date2database(time()));
     $object->setDateOfUpdate(NULL);
     $object->setPrice(10000);
     $object->setObjectType(3);
     $object->setRooms(5);
     $object->setRoomsType(1);
     $object->setSettlementID(1);
     $object->setLocationText("Альтернативне місцезнаходження");
     $object->setSettlementAreaID(1);
     $object->setStreet("Оболонський просп.");
     $object->setHouseNumber('15a');
     $object->setSquareAll(100.5);
     $object->setSquareLive(90.5);
     $object->setSquareKitchen(10.5);
     $object->setFloor(1);
     $object->setFloors(16);
     $object->setExternal(1);
     $object->setWcNumber(1);
     $object->setBathNumber(2);
     $object->setTelType(1);
     $object->setDescription("Якийсь додатковий опис.");
     $object->insert();
     $obj_id = $object->getObjectID();
     sleep(3);
     $object2 = $this->loadById($globalData, $obj_id);
     $object2->setPrice(20000);
     $update_time = time();
     $object2->setDateOfUpdate(tools_date2database($update_time));
     $object2->update();
     $object3 = $this->loadById($globalData, $obj_id);
     if ($object3->getPrice() != 20000) {
         throw new Exception('Incorrect value - price, after update.');
     }
     if (tools_database2date($object3->getDateOfUpdate()) != $update_time) {
         throw new Exception('Incorrect value - time, after update.');
     }
     RealEstateAgency_Object_RealEstateObject::deleteById($globalData, $obj_id);
 }