Instead of throwing, instantiate one with provided module config (see my previous suggestion of having a constructor and making this NOT a test case)