diff --git a/src/TNL/Meshes/MeshEntity.h b/src/TNL/Meshes/MeshEntity.h
index f5df2f22583aa9282e2ad04fa08230c792fcf4ab..312b3452b5cca61a26a41d31cff3759296b2fa01 100644
--- a/src/TNL/Meshes/MeshEntity.h
+++ b/src/TNL/Meshes/MeshEntity.h
@@ -226,7 +226,7 @@ std::ostream& operator <<( std::ostream& str, const MeshEntity< MeshConfig, Enti
  * This tells the compiler that theMeshEntity is a type with a dynamic memory allocation.
  * It is necessary for the loading and the saving of the mesh entities arrays.
  */
-namespace Containers{
+namespace Containers {
 template< typename MeshConfig,
           typename EntityTopology >
 struct DynamicTypeTag< Meshes::MeshEntity< MeshConfig, EntityTopology > >
diff --git a/src/UnitTests/Meshes/MeshEntityTest.h b/src/UnitTests/Meshes/MeshEntityTest.h
index 939f8037a42768ac8faaa0abf1733a2e4cbd23f4..594b6dfa251171d4d3620a56456e7ea9359cf6c9 100644
--- a/src/UnitTests/Meshes/MeshEntityTest.h
+++ b/src/UnitTests/Meshes/MeshEntityTest.h
@@ -48,6 +48,22 @@ class TestTetrahedronMeshConfig : public MeshConfigBase< MeshTetrahedronTopology
          return true;
       }
 };
+
+// stupid wrapper around MeshEntity to expose protected members needed for tests
+template< typename MeshConfig, typename EntityTopology >
+class TestMeshEntity
+   : public MeshEntity< MeshConfig, EntityTopology >
+{
+   using BaseType = MeshEntity< MeshConfig, EntityTopology >;
+
+public:
+   template< int Subdimensions >
+   void setSubentityIndex( const typename BaseType::LocalIndexType localIndex,
+                           const typename BaseType::GlobalIndexType globalIndex )
+   {
+      BaseType::template setSubentityIndex< Subdimensions >( localIndex, globalIndex );
+   }
+};
  
 using RealType = double;
 using Device = Devices::Host;
@@ -56,7 +72,7 @@ using IndexType = int;
 TEST( MeshEntityTest, VertexMeshEntityTest )
 {
    typedef MeshConfigBase< MeshEdgeTopology, 2, RealType, IndexType, IndexType, void > TestEntityTopology;
-   typedef MeshEntity< TestEntityTopology, MeshVertexTopology > VertexMeshEntityType;
+   typedef TestMeshEntity< TestEntityTopology, MeshVertexTopology > VertexMeshEntityType;
    typedef typename VertexMeshEntityType::PointType PointType;
 
    ASSERT_TRUE( PointType::getType() == ( Containers::StaticVector< 2, RealType >::getType() ) );
@@ -71,8 +87,8 @@ TEST( MeshEntityTest, VertexMeshEntityTest )
 
 TEST( MeshEntityTest, EdgeMeshEntityTest )
 {
-   typedef MeshEntity< TestEdgeEntityTopology, MeshEdgeTopology > EdgeMeshEntityType;
-   typedef MeshEntity< TestEdgeEntityTopology, MeshVertexTopology > VertexMeshEntityType;
+   typedef TestMeshEntity< TestEdgeEntityTopology, MeshEdgeTopology > EdgeMeshEntityType;
+   typedef TestMeshEntity< TestEdgeEntityTopology, MeshVertexTopology > VertexMeshEntityType;
 
    typedef typename VertexMeshEntityType::PointType PointType;
    ASSERT_TRUE( PointType::getType() == ( Containers::StaticVector< 2, RealType >::getType() ) );
@@ -134,12 +150,12 @@ TEST( MeshEntityTest, EdgeMeshEntityTest )
 
 TEST( MeshEntityTest, TriangleMeshEntityTest )
 {
-   typedef MeshEntity< TestTriangleMeshConfig, MeshTriangleTopology > TriangleMeshEntityType;
+   typedef TestMeshEntity< TestTriangleMeshConfig, MeshTriangleTopology > TriangleMeshEntityType;
 
    static_assert( TriangleMeshEntityType::SubentityTraits< 1 >::storageEnabled, "Testing triangular mesh does not store edges as required." );
    static_assert( TriangleMeshEntityType::SubentityTraits< 0 >::storageEnabled, "" );
-   typedef MeshEntity< TestEdgeEntityTopology, MeshEdgeTopology > EdgeMeshEntityType;
-   typedef MeshEntity< TestVertexEntityTopology, MeshVertexTopology > VertexMeshEntityType;
+   typedef TestMeshEntity< TestEdgeEntityTopology, MeshEdgeTopology > EdgeMeshEntityType;
+   typedef TestMeshEntity< TestVertexEntityTopology, MeshVertexTopology > VertexMeshEntityType;
    typedef typename VertexMeshEntityType::PointType PointType;
    ASSERT_TRUE( PointType::getType() == ( Containers::StaticVector< 2, RealType >::getType() ) );
 
@@ -200,10 +216,10 @@ TEST( MeshEntityTest, TetragedronMeshEntityTest )
    typedef MeshConfigBase< MeshEdgeTopology, 3, RealType, IndexType, IndexType, void > TestEdgeEntityTopology;
    typedef MeshConfigBase< MeshVertexTopology, 3, RealType, IndexType, IndexType, void > TestVertexEntityTopology;
 
-   typedef MeshEntity< TestTetrahedronMeshConfig, MeshTetrahedronTopology > TetrahedronMeshEntityType;
-   typedef MeshEntity< TestTriangleMeshConfig, MeshTriangleTopology > TriangleMeshEntityType;
-   typedef MeshEntity< TestEdgeEntityTopology, MeshEdgeTopology > EdgeMeshEntityType;
-   typedef MeshEntity< TestVertexEntityTopology, MeshVertexTopology > VertexMeshEntityType;
+   typedef TestMeshEntity< TestTetrahedronMeshConfig, MeshTetrahedronTopology > TetrahedronMeshEntityType;
+   typedef TestMeshEntity< TestTriangleMeshConfig, MeshTriangleTopology > TriangleMeshEntityType;
+   typedef TestMeshEntity< TestEdgeEntityTopology, MeshEdgeTopology > EdgeMeshEntityType;
+   typedef TestMeshEntity< TestVertexEntityTopology, MeshVertexTopology > VertexMeshEntityType;
    typedef typename VertexMeshEntityType::PointType PointType;
    ASSERT_TRUE( PointType::getType() == ( Containers::StaticVector< 3, RealType >::getType() ) );
 
@@ -320,9 +336,9 @@ TEST( MeshEntityTest, TetragedronMeshEntityTest )
 
 TEST( MeshEntityTest, TwoTrianglesMeshEntityTest )
 {
-   typedef MeshEntity< TestTriangleMeshConfig, MeshTriangleTopology > TriangleMeshEntityType;
-   typedef MeshEntity< TestTriangleMeshConfig, MeshEdgeTopology > EdgeMeshEntityType;
-   typedef MeshEntity< TestTriangleMeshConfig, MeshVertexTopology > VertexMeshEntityType;
+   typedef TestMeshEntity< TestTriangleMeshConfig, MeshTriangleTopology > TriangleMeshEntityType;
+   typedef TestMeshEntity< TestTriangleMeshConfig, MeshEdgeTopology > EdgeMeshEntityType;
+   typedef TestMeshEntity< TestTriangleMeshConfig, MeshVertexTopology > VertexMeshEntityType;
    typedef typename VertexMeshEntityType::PointType PointType;
    ASSERT_TRUE( PointType::getType() == ( Containers::StaticVector< 2, RealType >::getType() ) );