Move the selector logic out of Test and into its own component.

Signed-off-by: J. Renée Beach <splendidnoise@gmail.com>