diff --git a/test/porousmediumflow/richards/implicit/analytical/problem.hh b/test/porousmediumflow/richards/implicit/analytical/problem.hh
index 28fc2b19b3f8deae4d4599eb79b0aae7e905bf0f..818e2cd5724bc97ed72c29329bc091ed9472c981 100644
--- a/test/porousmediumflow/richards/implicit/analytical/problem.hh
+++ b/test/porousmediumflow/richards/implicit/analytical/problem.hh
@@ -33,6 +33,8 @@
 #include <dune/geometry/quadraturerules.hh>
 #include <dune/grid/yaspgrid.hh>
 
+#include <dumux/common/boundarytypes.hh>
+
 #include <dumux/discretization/cctpfa.hh>
 #include <dumux/discretization/box.hh>
 #include <dumux/porousmediumflow/problem.hh>
@@ -106,7 +108,7 @@ class RichardsAnalyticalProblem :  public PorousMediumFlowProblem<TypeTag>
     using ParentType = PorousMediumFlowProblem<TypeTag>;
     using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
     using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
-    using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
+    using BoundaryTypes = Dumux::BoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>;
     using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
     using Scalar = GetPropType<TypeTag, Properties::Scalar>;
     using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices;
diff --git a/test/porousmediumflow/richards/implicit/lens/problem.hh b/test/porousmediumflow/richards/implicit/lens/problem.hh
index 2629110f5d60a5cbaf8c00dd1b536a04ef7a1007..bcf448e218a1c1a388ff65e7ffa4bf2aa4a9b29c 100644
--- a/test/porousmediumflow/richards/implicit/lens/problem.hh
+++ b/test/porousmediumflow/richards/implicit/lens/problem.hh
@@ -35,6 +35,8 @@
 #include <dune/grid/uggrid.hh>
 #endif
 
+#include <dumux/common/boundarytypes.hh>
+
 #include <dumux/discretization/cctpfa.hh>
 #include <dumux/discretization/ccmpfa.hh>
 #include <dumux/discretization/box.hh>
@@ -116,7 +118,7 @@ class RichardsLensProblem : public PorousMediumFlowProblem<TypeTag>
     using ParentType = PorousMediumFlowProblem<TypeTag>;
     using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
     using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
-    using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
+    using BoundaryTypes = Dumux::BoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>;
     using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
     using Scalar = GetPropType<TypeTag, Properties::Scalar>;
     using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices;
diff --git a/test/porousmediumflow/richards/implicit/nonisothermal/conduction/problem.hh b/test/porousmediumflow/richards/implicit/nonisothermal/conduction/problem.hh
index bab2be4fd10d55dc9cb5dfadc1f83f13d362d46f..5032c98908df39356d53e33c753d9834607c36b0 100644
--- a/test/porousmediumflow/richards/implicit/nonisothermal/conduction/problem.hh
+++ b/test/porousmediumflow/richards/implicit/nonisothermal/conduction/problem.hh
@@ -29,6 +29,8 @@
 #include <cmath>
 #include <dune/grid/yaspgrid.hh>
 
+#include <dumux/common/boundarytypes.hh>
+
 #include <dumux/discretization/elementsolution.hh>
 #include <dumux/discretization/cctpfa.hh>
 #include <dumux/discretization/box.hh>
@@ -111,7 +113,7 @@ class RichardsNIConductionProblem :public PorousMediumFlowProblem<TypeTag>
     using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
     using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
     using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
-    using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
+    using BoundaryTypes = Dumux::BoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>;
     using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
     using ThermalConductivityModel = GetPropType<TypeTag, Properties::ThermalConductivityModel>;
     using VolumeVariables = GetPropType<TypeTag, Properties::VolumeVariables>;
diff --git a/test/porousmediumflow/richards/implicit/nonisothermal/convection/problem.hh b/test/porousmediumflow/richards/implicit/nonisothermal/convection/problem.hh
index 3b0fb1fd6cbbf3c42f179c77ce59c5cac7879327..276c9ad5af16460ae20d41ca901a9c8b75d8e84e 100644
--- a/test/porousmediumflow/richards/implicit/nonisothermal/convection/problem.hh
+++ b/test/porousmediumflow/richards/implicit/nonisothermal/convection/problem.hh
@@ -30,6 +30,8 @@
 #include <cmath>
 #include <dune/grid/yaspgrid.hh>
 
+#include <dumux/common/boundarytypes.hh>
+
 #include <dumux/discretization/elementsolution.hh>
 #include <dumux/discretization/cctpfa.hh>
 #include <dumux/discretization/box.hh>
@@ -115,7 +117,7 @@ class RichardsNIConvectionProblem : public PorousMediumFlowProblem<TypeTag>
     using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
     using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
     using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
-    using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
+    using BoundaryTypes = Dumux::BoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>;
     using ThermalConductivityModel = GetPropType<TypeTag, Properties::ThermalConductivityModel>;
     using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
     using ElementVolumeVariables = typename GridVariables::GridVolumeVariables::LocalView;
diff --git a/test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh b/test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh
index 5b6f9e3e3994d987aaa2f273b055fcaec49aaab2..a0c30f88956c17807f3354314709a6cef6387429 100644
--- a/test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh
+++ b/test/porousmediumflow/richards/implicit/nonisothermal/evaporation/problem.hh
@@ -29,6 +29,8 @@
 #include <cmath>
 #include <dune/grid/yaspgrid.hh>
 
+#include <dumux/common/boundarytypes.hh>
+
 #include <dumux/discretization/elementsolution.hh>
 #include <dumux/discretization/cctpfa.hh>
 #include <dumux/discretization/box.hh>
@@ -106,7 +108,7 @@ class RichardsNIEvaporationProblem : public PorousMediumFlowProblem<TypeTag>
     using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
     using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
     using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
-    using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
+    using BoundaryTypes = Dumux::BoundaryTypes<GetPropType<TypeTag, Properties::ModelTraits>::numEq()>;
     using ThermalConductivityModel = GetPropType<TypeTag, Properties::ThermalConductivityModel>;
     using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
     using ElementVolumeVariables = typename GridVariables::GridVolumeVariables::LocalView;