public function testParseMessage()
{
$message = join("\r\n", array('HTTP/1.1 404 Not Found', 'Header: Value', 'Connection: close', 'Content-Type: text/plain;charset=ISO-8859-1', '', 'Test!'));
$response = new Response(compact('message'));
$this->assertEqual($message, (string) $response);
$this->assertEqual('text', $response->type());
$this->assertEqual('ISO-8859-1', $response->encoding);
$this->assertEqual('404', $response->status['code']);
$this->assertEqual('Not Found', $response->status['message']);
$this->assertEqual('HTTP/1.1 404 Not Found', $response->status());
$body = 'Not a Message';
$expected = join("\r\n", array('HTTP/1.1 200 OK', '', '', 'Not a Message'));
$response = new Response(compact('body'));
$this->assertEqual($expected, (string) $response);
}