def METHOD_NAME(self):
    agreement_01 = self.test_agreement
    agreement_01.create_new_version()
    old_agreement = self.env["agreement"].search(
        [
            ("code", "=", agreement_01.code + "-V1"),
            ("active", "=", False),
        ]
    )
    self.assertEqual(len(old_agreement), 1)
    new_agreement = self.env["agreement"].search(
        [
            ("name", "=", "TestAgreement"),
            ("version", "=", 2),
        ]
    )
    self.assertEqual(len(new_agreement), 1)