Made test options an interface to reduce code duplication