Imported custom user classes in tests depending on it

Without those imports, affected test files cannot be run
independently. Refs #21164.