diff --git a/tests/face/ethernet.cpp b/tests/face/ethernet.cpp
index f2e7134..9322d4c 100644
--- a/tests/face/ethernet.cpp
+++ b/tests/face/ethernet.cpp
@@ -22,18 +22,21 @@
   if (interfaces.size() > 0)
     {
       shared_ptr<EthernetFace> face1;
-      BOOST_REQUIRE_NO_THROW(face1 = factory.createMulticast(interfaces[0],
-                                                             ethernet::getBroadcastAddress()));
+      BOOST_REQUIRE_NO_THROW(face1 =
+                             factory.createMulticastFace(interfaces[0],
+                                                     ethernet::getBroadcastAddress()));
       shared_ptr<EthernetFace> face1bis;
-      BOOST_REQUIRE_NO_THROW(face1bis = factory.createMulticast(interfaces[0],
-                                                                ethernet::getBroadcastAddress()));
+      BOOST_REQUIRE_NO_THROW(face1bis =
+                             factory.createMulticastFace(interfaces[0],
+                                                         ethernet::getBroadcastAddress()));
       BOOST_CHECK_EQUAL(face1, face1bis);
 
       if (interfaces.size() > 1)
         {
           shared_ptr<EthernetFace> face2;
-          BOOST_REQUIRE_NO_THROW(face2 = factory.createMulticast(interfaces[1],
-                                                                 ethernet::getBroadcastAddress()));
+          BOOST_REQUIRE_NO_THROW(face2 =
+                                 factory.createMulticastFace(interfaces[1],
+                                                             ethernet::getBroadcastAddress()));
           BOOST_CHECK_NE(face1, face2);
         }
       else
@@ -43,8 +46,9 @@
         }
 
       shared_ptr<EthernetFace> face3;
-      BOOST_REQUIRE_NO_THROW(face3 = factory.createMulticast(interfaces[0],
-                                                             ethernet::getDefaultMulticastAddress()));
+      BOOST_REQUIRE_NO_THROW(face3 =
+                             factory.createMulticastFace(interfaces[0],
+                                                         ethernet::getDefaultMulticastAddress()));
       BOOST_CHECK_NE(face1, face3);
     }
   else
@@ -67,7 +71,7 @@
     }
 
   shared_ptr<EthernetFace> face =
-    factory.createMulticast(interfaces[0], ethernet::getDefaultMulticastAddress());
+    factory.createMulticastFace(interfaces[0], ethernet::getDefaultMulticastAddress());
 
   BOOST_REQUIRE(static_cast<bool>(face));
   BOOST_CHECK_EQUAL(face->isLocal(), false);
diff --git a/tests/face/tcp.cpp b/tests/face/tcp.cpp
index bc65c8b..b601be2 100644
--- a/tests/face/tcp.cpp
+++ b/tests/face/tcp.cpp
@@ -19,11 +19,11 @@
 {
   TcpFactory factory;
   
-  shared_ptr<TcpChannel> channel1 = factory.create("127.0.0.1", "20070");
-  shared_ptr<TcpChannel> channel1a = factory.create("127.0.0.1", "20070");
+  shared_ptr<TcpChannel> channel1 = factory.createChannel("127.0.0.1", "20070");
+  shared_ptr<TcpChannel> channel1a = factory.createChannel("127.0.0.1", "20070");
   BOOST_CHECK_EQUAL(channel1, channel1a);
   
-  shared_ptr<TcpChannel> channel2 = factory.create("127.0.0.1", "20071");
+  shared_ptr<TcpChannel> channel2 = factory.createChannel("127.0.0.1", "20071");
   BOOST_CHECK_NE(channel1, channel2);
 }
 
@@ -181,8 +181,8 @@
                         bind(&EndToEndFixture::abortTestCase, this,
                              "TcpChannel error: cannot connect or cannot accept connection"));
   
-  shared_ptr<TcpChannel> channel1 = factory.create("127.0.0.1", "20070");
-  shared_ptr<TcpChannel> channel2 = factory.create("127.0.0.1", "20071");
+  shared_ptr<TcpChannel> channel1 = factory.createChannel("127.0.0.1", "20070");
+  shared_ptr<TcpChannel> channel2 = factory.createChannel("127.0.0.1", "20071");
   
   channel1->listen(bind(&EndToEndFixture::channel1_onFaceCreated,   this, _1),
                    bind(&EndToEndFixture::channel1_onConnectFailed, this, _1));
@@ -257,8 +257,8 @@
                         bind(&EndToEndFixture::abortTestCase, this,
                              "TcpChannel error: cannot connect or cannot accept connection"));
   
-  shared_ptr<TcpChannel> channel1 = factory.create("127.0.0.1", "20070");
-  shared_ptr<TcpChannel> channel2 = factory.create("127.0.0.1", "20071");
+  shared_ptr<TcpChannel> channel1 = factory.createChannel("127.0.0.1", "20070");
+  shared_ptr<TcpChannel> channel2 = factory.createChannel("127.0.0.1", "20071");
   
   channel1->listen(bind(&EndToEndFixture::channel_onFaceCreated,   this, _1),
                    bind(&EndToEndFixture::channel_onConnectFailed, this, _1));
@@ -275,14 +275,14 @@
 
   BOOST_CHECK_EQUAL(m_faces.size(), 2);
   
-  shared_ptr<TcpChannel> channel3 = factory.create("127.0.0.1", "20072");
+  shared_ptr<TcpChannel> channel3 = factory.createChannel("127.0.0.1", "20072");
   channel3->connect("127.0.0.1", "20070",
                     bind(&EndToEndFixture::channel_onFaceCreated, this, _1),
                     bind(&EndToEndFixture::channel_onConnectFailed, this, _1),
                     time::seconds(4)); // very short timeout
 
 
-  shared_ptr<TcpChannel> channel4 = factory.create("127.0.0.1", "20073");
+  shared_ptr<TcpChannel> channel4 = factory.createChannel("127.0.0.1", "20073");
 
   BOOST_CHECK_NE(channel3, channel4);
   
@@ -324,8 +324,8 @@
                         bind(&EndToEndFixture::abortTestCase, this,
                              "TcpChannel error: cannot connect or cannot accept connection"));
   
-  shared_ptr<TcpChannel> channel1 = factory.create("127.0.0.1", "20070");
-  shared_ptr<TcpChannel> channel2 = factory.create("127.0.0.1", "20071");
+  shared_ptr<TcpChannel> channel1 = factory.createChannel("127.0.0.1", "20070");
+  shared_ptr<TcpChannel> channel2 = factory.createChannel("127.0.0.1", "20071");
   
   channel1->listen(bind(&EndToEndFixture::channel1_onFaceCreated,   this, _1),
                    bind(&EndToEndFixture::channel1_onConnectFailed, this, _1));
diff --git a/tests/face/unix-stream.cpp b/tests/face/unix-stream.cpp
index c7cec87..beed83e 100644
--- a/tests/face/unix-stream.cpp
+++ b/tests/face/unix-stream.cpp
@@ -21,11 +21,11 @@
 {
   UnixStreamFactory factory;
 
-  shared_ptr<UnixStreamChannel> channel1 = factory.create("foo");
-  shared_ptr<UnixStreamChannel> channel1a = factory.create("foo");
+  shared_ptr<UnixStreamChannel> channel1 = factory.createChannel("foo");
+  shared_ptr<UnixStreamChannel> channel1a = factory.createChannel("foo");
   BOOST_CHECK_EQUAL(channel1, channel1a);
 
-  shared_ptr<UnixStreamChannel> channel2 = factory.create("bar");
+  shared_ptr<UnixStreamChannel> channel2 = factory.createChannel("bar");
   BOOST_CHECK_NE(channel1, channel2);
 }
 
@@ -147,7 +147,7 @@
                         bind(&EndToEndFixture::abortTestCase, this,
                              "UnixStreamChannel error: cannot connect or cannot accept connection"));
 
-  shared_ptr<UnixStreamChannel> channel1 = factory.create("foo");
+  shared_ptr<UnixStreamChannel> channel1 = factory.createChannel("foo");
   channel1->listen(bind(&EndToEndFixture::channel1_onFaceCreated,   this, _1),
                    bind(&EndToEndFixture::channel1_onConnectFailed, this, _1));
 
@@ -217,7 +217,7 @@
                         bind(&EndToEndFixture::abortTestCase, this,
                              "UnixStreamChannel error: cannot connect or cannot accept connection"));
 
-  shared_ptr<UnixStreamChannel> channel = factory.create("foo");
+  shared_ptr<UnixStreamChannel> channel = factory.createChannel("foo");
   channel->listen(bind(&EndToEndFixture::channel_onFaceCreated,   this, _1),
                   bind(&EndToEndFixture::channel_onConnectFailed, this, _1));
 
@@ -319,7 +319,7 @@
                         bind(&EndToEndFixture::abortTestCase, this,
                              "UnixStreamChannel error: cannot connect or cannot accept connection"));
 
-  shared_ptr<UnixStreamChannel> channel1 = factory.create("foo");
+  shared_ptr<UnixStreamChannel> channel1 = factory.createChannel("foo");
   channel1->listen(bind(&EndToEndFixture::channel1_onFaceCreated,   this, _1),
                    bind(&EndToEndFixture::channel1_onConnectFailed, this, _1));
 
