[#4635] Adding unit tests