Move test context initialization to object construction phase