Refactor delegation tests.