I am trying to Generate 16 digit random HEX number.
import org.apache.commons.lang.RandomStringUtils;
def randomhex = RandomStringUtils.randomNumeric(16);
log.info randomhex
def result = Integer.toHexString(randomhex);
log.info result
Expected : The result should be random 16 digit HEX number. e.g : 328A6D01F9FF12E0
Actual : groovy.lang.MissingMethodException: No signature of method: static java.lang.Integer.toHexString() is applicable for argument types: (java.lang.String) values: [3912632387180714] Possible solutions: toHexString(int), toString(), toString(), toString(), toString(int), toString(int, int) error at line: 9