public function testSingleReadWriteWithKey()
{
$key = Galleries::meta('key');
$new = Galleries::create(array($key => 12345, 'name' => 'Acme, Inc.'));
$result = $new->data();
$expected = array($key => 12345, 'name' => 'Acme, Inc.');
$this->assertEqual($expected[$key], $result[$key]);
$this->assertEqual($expected['name'], $result['name']);
$this->assertFalse($new->exists());
$this->assertTrue($new->save());
$this->assertTrue($new->exists());
$existing = Galleries::find(12345);
$result = $existing->data();
$this->assertEqual($expected[$key], $result[$key]);
$this->assertEqual($expected['name'], $result['name']);
$this->assertTrue($existing->exists());
$existing->name = 'Big Brother and the Holding Galleries';
$result = $existing->save();
$this->assertTrue($result);
$existing = Galleries::find(12345);
$result = $existing->data();
$expected['name'] = 'Big Brother and the Holding Galleries';
$this->assertEqual($expected[$key], $result[$key]);
$this->assertEqual($expected['name'], $result['name']);
$this->assertTrue($existing->delete());
}