Add unittest for issue 7