In which file/class should i keep my test code?

For testing my app i wrote some mockup code, which shall be called from different classes in different xxxDelegate and xxxView files.

Where should i put my mockup code? In a separate class/file? Which extends are needeed for this class then?