public function testFind()
{
list($conn, $keygen, $query) = $this->getMocks();
$instance = new DraftRepository($conn, $keygen);
$conn->shouldReceive('table')->andReturn($query);
$query->shouldReceive('where')->once()->with('id', 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')->andReturnSelf();
$query->shouldReceive('first')->once()->andReturn(['id' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', 'key' => 'someKey', 'val' => 'baz', 'etc' => 'a:1:{s:3:"foo";s:3:"bar";}']);
$draft = $instance->find('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
$array = $draft->jsonSerialize();
$this->assertEquals('baz', $array['val']);
$this->assertEquals('bar', $array['etc']['foo']);
}