[#1865] Kisitu/Faris | Added integration test. Refactored.