Factor common tests in a common file