Move creating the test configuration into a utility function