I just take a wire from the 5V of the arduino and link it to the pins 2 or 3 to generate the pin's value change like if it came from an external sensor
But, you are not enabling the internal pullup resistor on the interrupt pins, so, without a wire attached, the pins are floating.
You should enable the pullups, and then ground a pin to trigger the interrupt.