Fix quality flaws: add test.