@Test public void generateUniqueIdWhenInvalidEmptyPrefix() { Throwable exception = assertThrows(IllegalArgumentException.class, () -> { this.idGenerator.generateUniqueId("", "whatever"); }); assertEquals("The prefix [] should only contain alphanumerical characters and not be empty.", exception.getMessage()); }
public String generateUniqueId(String text) { return generateUniqueId("I", text); }
IdGenerator { public String generateUniqueId(String text) { return generateUniqueId("I", text); } }
IdGenerator { public String generateUniqueId(String text) { return generateUniqueId("I", text); } IdGenerator();  IdGenerator(IdGenerator idGenerator); }
IdGenerator { public String generateUniqueId(String text) { return generateUniqueId("I", text); } IdGenerator();  IdGenerator(IdGenerator idGenerator); String generateUniqueId(String text); String generateUniqueId(String prefix, String text); void remove(String id); void reset(); }
IdGenerator { public String generateUniqueId(String text) { return generateUniqueId("I", text); } IdGenerator();  IdGenerator(IdGenerator idGenerator); String generateUniqueId(String text); String generateUniqueId(String prefix, String text); void remove(String id); void reset();  }