Refactored test instantiation

refactored for less repetition