diff --git a/test/geomechanics/elastic/problem.hh b/test/geomechanics/elastic/problem.hh
index 559c5f03f234eefbed73c35ad332a02a3fb75683..ebbca81c482d76e03b6e54e44421cf5848aea9f3 100644
--- a/test/geomechanics/elastic/problem.hh
+++ b/test/geomechanics/elastic/problem.hh
@@ -28,6 +28,7 @@
 #include <dune/common/fmatrix.hh>
 #include <dune/grid/yaspgrid.hh>
 
+#include <dumux/common/boundarytypes.hh>
 #include <dumux/discretization/box.hh>
 #include <dumux/geomechanics/elastic/model.hh>
 #include <dumux/geomechanics/fvproblem.hh>
@@ -69,7 +70,7 @@ class ElasticProblem : public GeomechanicsFVProblem<TypeTag>
 
     using Scalar = GetPropType<TypeTag, Properties::Scalar>;
     using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices;
-    using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
+    using BoundaryTypes = Dumux::BoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>;
     using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
     using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
 
diff --git a/test/geomechanics/poroelastic/problem.hh b/test/geomechanics/poroelastic/problem.hh
index 69ed2f3a927dcf86b1adff400ef962582464b412..1b9c376d062993bad18ddad41ace31c60195da2c 100644
--- a/test/geomechanics/poroelastic/problem.hh
+++ b/test/geomechanics/poroelastic/problem.hh
@@ -28,6 +28,7 @@
 #include <dune/common/fmatrix.hh>
 #include <dune/grid/yaspgrid.hh>
 
+#include <dumux/common/boundarytypes.hh>
 #include <dumux/discretization/box.hh>
 #include <dumux/geomechanics/poroelastic/model.hh>
 #include <dumux/geomechanics/fvproblem.hh>
@@ -80,7 +81,7 @@ class PoroElasticProblem : public GeomechanicsFVProblem<TypeTag>
 
     using Scalar = GetPropType<TypeTag, Properties::Scalar>;
     using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices;
-    using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
+    using BoundaryTypes = Dumux::BoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>;
     using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
     using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
     using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;