StringSequenceValueGenerator implements ValueGenerator<String> { @Override public String nextValue() { long number = next; next += increment; return prefix + leftPadIfNecessary(number); } StringSequenceValueGenerator(String prefix); private  StringSequenceValueGenerator(String prefix, long next, int increment, int paddedNumberLength); StringSequenceValueGenerator withLeftPadding(int paddedNumberLength); StringSequenceValueGenerator withoutLeftPadding(); StringSequenceValueGenerator startingAt(long start); StringSequenceValueGenerator incrementingBy(int increment); @Override String nextValue(); @Override String toString();  }
@Test public void incrementsByOne() { StringSequenceValueGenerator sequence = ValueGenerators.stringSequence("CODE_"); sequence.nextValue(); assertEquals("CODE_2", sequence.nextValue()); }
@Test public void startsAtOne() { assertEquals("CODE_1", ValueGenerators.stringSequence("CODE_").nextValue()); }