public function testDelete()
{
list($conn, $keygen, $query) = $this->getMocks();
$instance = new DraftRepository($conn, $keygen);
$mockEntity = m::mock('Xpressengine\\Draft\\DraftEntity');
$mockEntity->shouldReceive('get')->with('id')->andReturn('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
$conn->shouldReceive('table')->andReturn($query);
$query->shouldReceive('where')->once()->with('id', 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')->andReturnSelf();
$query->shouldReceive('delete')->once()->andReturn(1);
$instance->delete($mockEntity);
}