Fix wrong delegate to Adapter::setMode().
Fix chmod test.