The country said it had to test the weapon to strengthen its defenses against what it considers U.S. aggression .