Fix tests
Fix adapter
Add tests