diff --git a/tests/pool.cpp b/tests/pool.cpp
index 0ba65815627339ad5438cafa28cdeb1f8dc0ebf0..ab323bf9f106da027ac38010567c993aa6f4f5b8 100644
--- a/tests/pool.cpp
+++ b/tests/pool.cpp
@@ -54,6 +54,7 @@ BOOST_AUTO_TEST_CASE (pool_list)
   output_test_stream output;
   dynamicgraph::g_pool.commandLine("pool", "list", in, output);
   BOOST_CHECK (output.is_equal ("MyEntityInst (MyEntity)\n"));
+  dynamicgraph::g_pool.deregisterEntity(myEntity.getName());
 }
 
 BOOST_AUTO_TEST_CASE (pool_display)
@@ -63,4 +64,5 @@ BOOST_AUTO_TEST_CASE (pool_display)
   dynamicgraph::Entity& e = dynamicgraph::g_pool.getEntity("MyEntityInst");
   e.display(output);
   BOOST_CHECK (output.is_equal ("Hello! My name is MyEntityInst !\n"));
+  dynamicgraph::g_pool.deregisterEntity(myEntity.getName());
 }