There is a function to generate random numbers, if you make the range large enough the chances that you will get the same number twice is insignificant
Altenatively, you could use a datetime stamp (function Get Current DateTime String), which is always unique if you make it detailed enough for your test case. For instance, if you generate such a number every minute, make sure the datetime string contains something smaller than minutes (seconds, or milliseconds). If you use date format without white spaces or special characters, ‘yyyyMMddHHmmssSSS’ for instance, you get something back that is numeric only and could possibly be used as national number.
Check out the link below if you need information about how to create a valid DateTime format:https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html