Added unittest for issue 7767