test refactors to separate unit from integ.