When saving messages, ImapTest needs to get the messages from somewhere. mbox parameter specifies path to a file in mbox format that's used.
Messages are sequentially appended from there. Once ImapTest reaches the last message, it wraps back to appending the first message.
Currently ImapTest's state tracking expects that Message-IDs are unique within the mbox, otherwise it gives bogus errors. If you really want to avoid changing the Message-IDs, use no_tracking setting to disable state tracking.