IF one won't be using these test accounts for anything in Moodle involving email (like forums), then one way is to use the fully qualified domain name of the moodle (since moodle servers are not typically set up as a mail server as well ... only smart SMTP relays).
Example: username 'test1' ... and your moodle's FQDN is 'elearning.somenet.net' then email for test1 user is 'test1@elearning.somenet.net'
Anytime one wants to test things involving email, install postfix as local/sending only - smart smtp relay and establish accounts (email only) on elearning.somenet.net server. That mail can be checked via command line alpine or any panel that allows interface into mail accounts on that server ... like Webmin.
Above is one way ... others probably have their takes on such things.
'SoS', Ken