Fixed structure of test code.
Fixed structure of test code and added one exception test.
Fixed structure of test code.