public function testRead()
{
$encrypt = new Encrypt(array('secret' => $this->secret));
$key = 'fookey';
$value = 'barvalue';
$result = $encrypt->write($value, array('class' => $this->mock, 'key' => $key));
$this->assertNotEmpty($result);
$cookie = MockCookieSession::data();
$result = $encrypt->read($key, array('class' => $this->mock, 'key' => $key));
$this->assertEqual($value, $result);
$this->assertNotEqual($cookie['__encrypted'], $result);
}