Refactored: adapters and its tests