@Test public void testDefaultPrefix() { String generated = generator.generateId(); assertTrue(generated.startsWith(IdGenerator.DEFAULT_PREFIX)); assertFalse(generated.substring(IdGenerator.DEFAULT_PREFIX.length()).startsWith(":")); }
public String generateId() { StringBuilder sb = new StringBuilder(64); sb.append(prefix); sb.append(UUID.randomUUID()); sb.append(":"); sb.append(sequence.getAndIncrement()); return sb.toString(); }
IdGenerator { public String generateId() { StringBuilder sb = new StringBuilder(64); sb.append(prefix); sb.append(UUID.randomUUID()); sb.append(":"); sb.append(sequence.getAndIncrement()); return sb.toString(); } }
IdGenerator { public String generateId() { StringBuilder sb = new StringBuilder(64); sb.append(prefix); sb.append(UUID.randomUUID()); sb.append(":"); sb.append(sequence.getAndIncrement()); return sb.toString(); } IdGenerator(String prefix);  IdGenerator(); }
IdGenerator { public String generateId() { StringBuilder sb = new StringBuilder(64); sb.append(prefix); sb.append(UUID.randomUUID()); sb.append(":"); sb.append(sequence.getAndIncrement()); return sb.toString(); } IdGenerator(String prefix);  IdGenerator(); String generateId(); }
IdGenerator { public String generateId() { StringBuilder sb = new StringBuilder(64); sb.append(prefix); sb.append(UUID.randomUUID()); sb.append(":"); sb.append(sequence.getAndIncrement()); return sb.toString(); } IdGenerator(String prefix);  IdGenerator(); String generateId(); static final String DEFAULT_PREFIX; static final String PROPERTY_IDGENERATOR_HOST_PREFIX; }