Added unit test for Pull-Request #246