BS-7642
Add unit tests