CLA-576 Remove duplicate code
CLA-576 Add more registry tests