diff --git a/unitTesting/CMakeLists.txt b/unitTesting/CMakeLists.txt
index be31ec9523231c53a1442d6205a8e0fb63d9928e..58ec67bf1af12363629959baca0ac860fe668360 100644
--- a/unitTesting/CMakeLists.txt
+++ b/unitTesting/CMakeLists.txt
@@ -6,7 +6,8 @@
 SET(tests
 	test_shell
 	test_pool
-	test_depend)
+	test_depend
+	test_factory)
 
 FOREACH(test_name ${tests})
 	SET(EXECUTABLE_NAME ${test_name})
diff --git a/unitTesting/test_depend.cpp b/unitTesting/test_depend.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..f8b10f59a38bc6489bb77d04a9bb735b395ca5a0
--- /dev/null
+++ b/unitTesting/test_depend.cpp
@@ -0,0 +1,159 @@
+/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ * Copyright Projet VISTA / IRISA, 2003
+ *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ *
+ * File:      test_categorie.cc
+ * Project:   Traces
+ * Author:    Nicolas Mansard
+ *
+ * Version control
+ * ===============
+ *
+ *  $Id: test_boost.cpp,v 1.1.1.1 2006-07-03 05:17:37 nmansard Exp $
+ *
+ * Description
+ * ============
+ *
+ * Test la classe CategorieTrace.
+ *
+ * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+
+/* -------------------------------------------------------------------------- */
+/* --- INCLUDES ------------------------------------------------------------- */
+/* -------------------------------------------------------------------------- */
+// #include <sot/sotSignal.h>
+#include <dynamic-graph/signal.h>
+#include <dynamic-graph/signal-time-dependant.h>
+//#include <sot/TimeDependancy.h>
+#include <dynamic-graph/debug.h>
+#include <iostream>
+#include <string>
+
+using namespace std;
+
+
+
+
+template< class Res=double >
+class DummyClass
+{
+
+public:
+  std::string proname;
+  list< SignalTimeDependant<double,int>* > inputsig;
+  list< SignalTimeDependant<string,int>* > inputsigV;
+
+public:
+  DummyClass( const std::string& n ) : proname(n),res(),appel(0),timedata(0) {}
+
+  Res& fun( Res& res,int t) 
+  {
+    appel++;  timedata=t; 
+
+    cout << "Inside " << proname << " -> " << this 
+	 << endl;
+    for( list< SignalTimeDependant<double,int>* >::iterator it=inputsig.begin();
+	 it!=inputsig.end();++it )
+      {
+	cout << *(*it) << endl; 
+	(*it)->access(timedata);
+      }
+    for( list< SignalTimeDependant<string,int>* >::iterator it=inputsigV.begin();
+	 it!=inputsigV.end();++it )
+      { cout << *(*it) << endl; (*it)->access(timedata);}
+
+    return res=(*this)();
+  }
+
+  void add( SignalTimeDependant<double,int>& sig )
+  {    inputsig.push_back(&sig);   }
+  void add( SignalTimeDependant<string,int>& sig )
+  {    inputsigV.push_back(&sig);   }
+
+  Res operator() ( void );
+
+  Res res;
+  int appel;
+  int timedata;
+  
+};
+
+template< class Res >
+Res DummyClass<Res>::operator() (void)
+{ return this->res; }
+
+template<>
+double DummyClass<double>::operator() (void)
+{
+  res=appel*timedata; return res;
+}
+template<>
+string DummyClass<string>::operator() (void)
+{
+  ostringstream oss;
+  oss << appel*timedata;
+  return oss.str();
+}
+
+
+int main( void )
+{
+   DummyClass<double> pro1("pro1"),pro3("pro3"),pro5("pro5");
+   DummyClass<string> pro2("pro2"),pro4("pro4"),pro6("pro6");
+
+   SignalTimeDependant<double,int> sig5("Sig5");
+   SignalTimeDependant<string,int> sig6("Sig6");
+   
+   SignalTimeDependant<string,int> sig4(sig5,"Sig4");
+   SignalTimeDependant<string,int> sig2(sig4<<sig4<<sig4<<sig6,"Sig2");
+   SignalTimeDependant<double,int> sig3(sig2<<sig5<<sig6,"Sig3");
+   SignalTimeDependant<double,int> sig1( boost::bind(&DummyClass<double>::fun,&pro1,_1,_2),
+					   sig2<<sig3,"Sig1");
+
+//    cout << "--- Test Array ------ "<<endl;
+//    sotSignalArray<int> tarr(12);
+//    tarr<<sig3<<sig2;//+sig2+sig3;
+//    dispArray(sig4<<sig2<<sig3);
+//    dispArray(tarr);
+
+   sig2.setFunction( boost::bind(&DummyClass<string>::fun,&pro2,_1,_2) );
+   sig3.setFunction( boost::bind(&DummyClass<double>::fun,&pro3,_1,_2) );
+   sig4.setFunction( boost::bind(&DummyClass<string>::fun,&pro4,_1,_2) );
+   sig5.setFunction( boost::bind(&DummyClass<double>::fun,&pro5,_1,_2) );
+   sig6.setFunction( boost::bind(&DummyClass<string>::fun,&pro6,_1,_2) );
+
+   pro1.add(sig2);
+   pro1.add(sig3);
+   pro2.add(sig4);
+   pro2.add(sig4);
+   pro2.add(sig4);
+   pro3.add(sig2);
+   pro4.add(sig5);
+   pro2.add(sig6);
+   pro3.add(sig5);
+   pro3.add(sig6);
+   
+   sig5.setDependancyType(TimeDependancy<int>::ALWAYS_READY);
+   sig6.setDependancyType(TimeDependancy<int>::BOOL_DEPENDANT);
+
+   sig6.setReady();
+
+   sig1.displayDependancies(cout)<<endl;
+ 
+   cout << "Needs update?"<< endl <<  sig1.needUpdate(2) << endl;
+   dgDEBUG(1) << "Access sig1(2) "<<endl;
+   sig1.access(2);
+   sig1.displayDependancies(cout)<<endl;
+   dgDEBUG(1) << "Access sig2(4) "<<endl;
+   sig2.access(4);
+   sig1.displayDependancies(cout)<<endl;
+   dgDEBUG(1) << "Access sig1(4) "<<endl;
+   sig1.access(4);
+   sig1.displayDependancies(cout)<<endl;
+
+   sig1.needUpdate(6);
+   sig1.needUpdate(6);
+
+  return 0;
+
+}
diff --git a/unitTesting/test_factory.cpp b/unitTesting/test_factory.cpp
index 70f53bfc8aed70251e676c02acd338ea088e6285..c471edf9d70280d6aa57b4e11dda1cfe362c5206 100644
--- a/unitTesting/test_factory.cpp
+++ b/unitTesting/test_factory.cpp
@@ -25,6 +25,7 @@
 #include <string>
 #include <iostream>
 #include <cstdlib>
+#include <sstream>
 
 #include <dynamic-graph/factory.h>
 #include <dynamic-graph/entity.h>
@@ -96,7 +97,8 @@ if( NULL==dlib )
 #endif
   if( NULL==dlib ) 
     {
-      cerr << " Error dl"<<endl;
+	  cout << "This test can only be run after the package StackOfTasks has been installed\n"
+			  "Could not find sotGainAdaptive shared library" << endl;
 #ifndef WIN32
       cerr << dlerror() <<endl;
 #else
@@ -120,7 +122,13 @@ if( NULL==dlib )
       exit(0);
     }
 
-  Entity* gain = factory.newEntity("GainAdaptative","Gain");
+  Entity* gain = 0;
+  if ( !factory.existEntity("GainAdaptative") ) {
+	  cout << "Could not find entity class 'GainAdaptative'" << endl;
+	  exit(0);
+	}
+  else
+	 gain = factory.newEntity("GainAdaptative","Gain");
 
   
   gain->display(cout); cout << endl;