add test codes

to catch error reported on #52