Tests for Step 6 and refactoring of tests