diff --git a/tests/daemon/face/tcp.cpp b/tests/daemon/face/tcp.cpp
index fa527e9..80e357d 100644
--- a/tests/daemon/face/tcp.cpp
+++ b/tests/daemon/face/tcp.cpp
@@ -79,6 +79,45 @@
   BOOST_CHECK_EQUAL(expectedChannels.size(), 0);
 }
 
+class FaceCreateFixture : protected BaseFixture
+{
+public:
+  void
+  ignore()
+  {
+  }
+
+  void
+  checkError(const std::string& errorActual, const std::string& errorExpected)
+  {
+    BOOST_CHECK_EQUAL(errorActual, errorExpected);
+  }
+
+  void
+  failIfError(const std::string& errorActual)
+  {
+    BOOST_FAIL("No error expected, but got: [" << errorActual << "]");
+  }
+};
+
+BOOST_FIXTURE_TEST_CASE(FaceCreate, FaceCreateFixture)
+{
+  TcpFactory factory = TcpFactory();
+
+  factory.createFace(FaceUri("tcp4://127.0.0.1"),
+                     bind(&FaceCreateFixture::ignore, this),
+                     bind(&FaceCreateFixture::failIfError, this, _1));
+
+  factory.createFace(FaceUri("tcp4://127.0.0.1/"),
+                     bind(&FaceCreateFixture::ignore, this),
+                     bind(&FaceCreateFixture::failIfError, this, _1));
+
+  factory.createFace(FaceUri("tcp4://127.0.0.1/path"),
+                     bind(&FaceCreateFixture::ignore, this),
+                     bind(&FaceCreateFixture::checkError, this, _1, "Invalid URI"));
+
+}
+
 class EndToEndFixture : protected BaseFixture
 {
 public:
diff --git a/tests/daemon/face/udp.cpp b/tests/daemon/face/udp.cpp
index 40485ca..503ec74 100644
--- a/tests/daemon/face/udp.cpp
+++ b/tests/daemon/face/udp.cpp
@@ -61,25 +61,29 @@
 class FactoryErrorCheck : protected BaseFixture
 {
 public:
-  bool isTheSameMulticastEndpoint(const UdpFactory::Error& e) {
+  bool
+  isTheSameMulticastEndpoint(const UdpFactory::Error& e) {
     return strcmp(e.what(),
                   "Cannot create the requested UDP unicast channel, local "
                   "endpoint is already allocated for a UDP multicast face") == 0;
   }
 
-  bool isNotMulticastAddress(const UdpFactory::Error& e) {
+  bool
+  isNotMulticastAddress(const UdpFactory::Error& e) {
     return strcmp(e.what(),
                   "Cannot create the requested UDP multicast face, "
                   "the multicast group given as input is not a multicast address") == 0;
   }
 
-  bool isTheSameUnicastEndpoint(const UdpFactory::Error& e) {
+  bool
+  isTheSameUnicastEndpoint(const UdpFactory::Error& e) {
     return strcmp(e.what(),
                   "Cannot create the requested UDP multicast face, local "
                   "endpoint is already allocated for a UDP unicast channel") == 0;
   }
 
-  bool isLocalEndpointOnDifferentGroup(const UdpFactory::Error& e) {
+  bool
+  isLocalEndpointOnDifferentGroup(const UdpFactory::Error& e) {
     return strcmp(e.what(),
                   "Cannot create the requested UDP multicast face, local "
                   "endpoint is already allocated for a UDP multicast face "
@@ -201,6 +205,45 @@
 //                    UdpFactory::Error);
 }
 
+class FaceCreateFixture : protected BaseFixture
+{
+public:
+  void
+  ignore()
+  {
+  }
+
+  void
+  checkError(const std::string& errorActual, const std::string& errorExpected)
+  {
+    BOOST_CHECK_EQUAL(errorActual, errorExpected);
+  }
+
+  void
+  failIfError(const std::string& errorActual)
+  {
+    BOOST_FAIL("No error expected, but got: [" << errorActual << "]");
+  }
+};
+
+BOOST_FIXTURE_TEST_CASE(FaceCreate, FaceCreateFixture)
+{
+  UdpFactory factory = UdpFactory();
+
+  factory.createFace(FaceUri("udp4://127.0.0.1"),
+                     bind(&FaceCreateFixture::ignore, this),
+                     bind(&FaceCreateFixture::failIfError, this, _1));
+
+  factory.createFace(FaceUri("udp4://127.0.0.1/"),
+                     bind(&FaceCreateFixture::ignore, this),
+                     bind(&FaceCreateFixture::failIfError, this, _1));
+
+  factory.createFace(FaceUri("udp4://127.0.0.1/path"),
+                     bind(&FaceCreateFixture::ignore, this),
+                     bind(&FaceCreateFixture::checkError, this, _1, "Invalid URI"));
+
+}
+
 class EndToEndFixture : protected BaseFixture
 {
 public:
