generateWmi method
Generate a random (valid) WMI
Implementation
String generateWmi() {
var wmi =
manufacturers.keys.elementAt(_random.nextInt(manufacturers.length));
// If the manufacturer produces less than 500 vehicles/year, the 3rd digit
// of the WMI must be 9.
if (wmi.length == 2) {
wmi += '9';
}
return wmi;
}