Add test case same as #166

We cannot merge #166 patches. I fixed it for merging to current source.

@uk-ar Please check this change.