In actions brought by executors and administrators, demands against their testators and intestates, and belonging to defendant at the time of their death, may be set off by the defendant in the same manner as if the action had been brought by and in the name of the deceased.