North Korea has right to test weapons given hostile policies- U.N. envoy