public function testFind()
 {
     list($conn, $keygen, $query) = $this->getMocks();
     $instance = new TemporaryRepository($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";}']);
     $temporary = $instance->find('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
     $array = $temporary->jsonSerialize();
     $this->assertEquals('baz', $array['val']);
     $this->assertEquals('bar', $array['etc']['foo']);
 }
 /**
  * 아이디에 해당 하는 데이터 반환
  *
  * @param string $id 임시저장 아이디
  * @return TemporaryEntity
  */
 public function getById($id)
 {
     return $this->repo->find($id);
 }