Agreement to have lunch, perhaps, during test (6)
I believe the answer is:
treaty
'agreement' is the definition.
(I know that agreement can be written as treaty)
'lunch perhaps during test' is the wordplay.
'lunch perhaps' becomes 'eat' (lunching is a kind of eating).
'during' means one lot of letters goes inside another.
'test' becomes 'try' (synonyms).
'eat' going within 'try' is 'TREATY'.
'to have' acts as a link.
(Other definitions for treaty that I've seen before include "something of Rome or Versailles?" , "'Pact, accord (6)'" , "Pact or agreement between nations" , "Pact, accord between states" , "International agreement" .)