diff --git a/tests/Messages/FactoryTest.php b/tests/Messages/FactoryTest.php
index <HASH>..<HASH> 100644
--- a/tests/Messages/FactoryTest.php
+++ b/tests/Messages/FactoryTest.php
@@ -4,6 +4,7 @@ namespace WyriHaximus\React\Tests\ChildProcess\Messenger\Messages;
 
 use WyriHaximus\React\ChildProcess\Messenger\Messages\Factory;
 use WyriHaximus\React\ChildProcess\Messenger\Messages\Line;
+use WyriHaximus\React\ChildProcess\Messenger\Messages\LineInterface;
 use WyriHaximus\React\ChildProcess\Messenger\Messages\Message;
 use WyriHaximus\React\ChildProcess\Messenger\Messages\Payload;
 
@@ -34,6 +35,15 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
         $this->assertTrue($tests($line));
     }
 
+    /**
+     * @expectedException Exception
+     * @expectedExceptionMessage Unknown message type: massage
+     */
+    public function testFromLineException()
+    {
+        Factory::fromLine('{"type":"massage","payload":["foo","bar"]}' . LineInterface::EOL, []);
+    }
+
     public function providerMessage()
     {
         yield [
Added test that checks for exception for uknown message type