Some other minor changes to make ATLTransformationQuery testable.

Change the random into a dependency so we may control what the Random return in the tests