Newly add tests of three functions