UC-1990 - add unit tests; fix precommit and a bug in paging context