Reformulated the assert statement that checks for the correct value of <code>densitySelection</code>.