BAC-984: add unit tests