Modified test code.

Some test codes were not written or wrong.