Extract test dir pattern to adapters