Refactored the code of the adapter and made sure the unit tests passed with a 100% coverage.