Add unit test for bug fix