Add tests according to issue #931.