[#1764] Add tests.