DeviceIdentityBuilder { public static String randomUDI() { String udi = System.getProperty("randomUDI"); if (null != udi && !"".equals(udi)) { return udi; } else { StringBuilder sb = new StringBuilder(); java.util.Random random = new java.util.Random(System.currentTimeMillis()); for (int i = 0; i < UDI_LENGTH; i++) { sb.append(UDI_CHARS[random.nextInt(UDI_CHARS.length)]); } return sb.toString(); } } DeviceIdentityBuilder();   DeviceIdentityBuilder(DeviceIdentity p); DeviceIdentity build(); DeviceIdentityBuilder softwareRev(); DeviceIdentityBuilder model(String model); DeviceIdentityBuilder osName(); DeviceIdentityBuilder withIcon(Object dev, String iconResourceName); DeviceIdentityBuilder withIcon(Class dev, String iconResourceName); static String randomUDI();  }
@Test public void testRandomUDI() { String str = DeviceIdentityBuilder.randomUDI(); Assert.assertNotNull(str); Assert.assertEquals(36, str.length()); }