split out tests into separate files, refactor ctx dispose as it is a mutating operation