Added unit tests for the whole change