Impelment #442
Add a unit test for #442