public function testLifecycleSupplier()
 {
     $retVal = $this->_createSupplier();
     $this->assertEquals(4294967, $retVal["number"]);
     $this->assertEquals("Worldwide Electronics International", $retVal["name"]);
     $this->assertEquals("http://wwei.cn", $retVal["url"]);
     $this->assertEquals(NULL, $retVal['description']);
     $this->assertEquals('Yiting', $retVal['cpextern_id']['n_given']);
     $this->assertEquals('Huang', $retVal['cpextern_id']['n_family']);
     $this->assertEquals('Hans Friedrich', $retVal['cpintern_id']['n_given']);
     $this->assertEquals('Ochs', $retVal['cpintern_id']['n_family']);
     // delete record (set deleted=1) of customer and assigned addresses
     $this->_json->deleteSuppliers(array($retVal['id']));
     $customerBackend = new Sales_Backend_Supplier();
     $deletedSupplier = $customerBackend->get($retVal['id'], TRUE);
     $this->assertEquals(1, $deletedSupplier->is_deleted);
     $addressBackend = new Sales_Backend_Address();
     $deletedAddresses = $addressBackend->getMultipleByProperty($retVal['id'], 'customer_id', TRUE);
     $this->assertEquals(1, $deletedAddresses->count());
     foreach ($deletedAddresses as $address) {
         $this->assertEquals(1, $address->is_deleted);
     }
     $this->setExpectedException('Tinebase_Exception_NotFound');
     return $this->_json->getSupplier($retVal['id']);
 }