Correct code and test.