diff --git a/test/material/fluidsystems/checkfluidsystem.hh b/test/material/fluidsystems/checkfluidsystem.hh
index 8fb9857b99889216808228f53bcda678d5e51778..bdcaf34a3bd2229e43c5bdf2aa1a101986b47bfd 100644
--- a/test/material/fluidsystems/checkfluidsystem.hh
+++ b/test/material/fluidsystems/checkfluidsystem.hh
@@ -86,6 +86,7 @@ public:
             BaseFluidState::setSaturation(phaseIdx, 1.0 / numPhases);
             BaseFluidState::setPressure(phaseIdx, 1e5);
             BaseFluidState::setDensity(phaseIdx, 1.0);
+            BaseFluidState::setMolarDensity(phaseIdx, 1.0);
 
             for (int compIdx = 0; compIdx < numComponents; ++compIdx)
             {
diff --git a/test/material/immiscibleflash/test_immiscibleflash.cc b/test/material/immiscibleflash/test_immiscibleflash.cc
index 958980b9371a676068f2f0aa6b992d382aa0e150..99f1e99db90238ca0ce72943a64ed82dac89d021 100644
--- a/test/material/immiscibleflash/test_immiscibleflash.cc
+++ b/test/material/immiscibleflash/test_immiscibleflash.cc
@@ -142,7 +142,9 @@ void completeReferenceFluidState(FluidState &fs,
     paramCache.updateAll(fs);
     for (int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx) {
         Scalar rho = FluidSystem::density(fs, paramCache, phaseIdx);
+        Scalar rhoMolar = FluidSystem::molarDensity(fs, paramCache, phaseIdx);
         fs.setDensity(phaseIdx, rho);
+        fs.setMolarDensity(phaseIdx, rhoMolar);
     }
 }
 
diff --git a/test/material/pengrobinson/test_pengrobinson.cc b/test/material/pengrobinson/test_pengrobinson.cc
index b3e28857fa19e919c33d3df3da5945cdd1fcd37d..508b566b8e910a6f74c6b04928f8e603aba91979 100644
--- a/test/material/pengrobinson/test_pengrobinson.cc
+++ b/test/material/pengrobinson/test_pengrobinson.cc
@@ -71,6 +71,7 @@ Scalar bringOilToSurface(FluidState &surfaceFluidState, Scalar alpha, const Flui
                                                   reservoirFluidState.moleFraction(phaseIdx, compIdx));
             }
             surfaceFluidState.setDensity(phaseIdx, reservoirFluidState.density(phaseIdx));
+            surfaceFluidState.setMolarDensity(phaseIdx, reservoirFluidState.molarDensity(phaseIdx));
             surfaceFluidState.setPressure(phaseIdx, reservoirFluidState.pressure(phaseIdx));
             surfaceFluidState.setSaturation(phaseIdx, 0.0);
         }
@@ -189,7 +190,9 @@ int main(int argc, char** argv)
     // density
     paramCache.updatePhase(fluidState, oPhaseIdx);
     Scalar rho = FluidSystem::density(fluidState, paramCache, oPhaseIdx);
+    Scalar rhoMolar = FluidSystem::molarDensity(fluidState, paramCache, oPhaseIdx);
     fluidState.setDensity(oPhaseIdx, rho);
+    fluidState.setMolarDensity(oPhaseIdx, rhoMolar);
 
     ////////////
     // Calculate the total molarities of the components