CP-8514: Unit Tests for the touched areas

These unit tests will cover the areas touched by the implementation of CP-8514 (a34ef9c15f9b98c3b4c0d5cba74dafaa430f76cc)