I called undoMethod from the TestClass only once. But undo method executed number of times the registerUndo.
this is my test class.
import XCTest @test