Refactor a bit of duplicated code to useIntegratedAs.