Add test cases for #4063.

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