Add tests for problem 6