Fix.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Add more tests.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>