I've got a problem with trying to randomize some values. In this case I'm using Random to select a title from a string list.
import java.util.Random;
titles = "Mr,Mrs,Sir,Ms,Dr";
String[] titles = titles.split(",");
Random random = new Random();
String randomValue = titles[random.nextInt(titles.length)];
vars.put("TITLE", randomValue);
Above works fine for a single run of a thread but if you're looping then it stops generating new values. If I run multiple threads then it generates different values.