### Question:
MongoSequence implements ISequence { public String getNext() { String v = SixtyTwoBase.tenBaseToSixtyTwo(getNextFromDB()); char c = v.charAt(0); while ( c >= '0' && c <= '9') { v = SixtyTwoBase.tenBaseToSixtyTwo(getNextFromDB()); c = v.charAt(0); } return v; } MongoSequence(Mongo mongo, String dbName, String collName, String key); String getNext();  }### Answer:
@Test public void testSequenceCollCreation_1() { MongoSequence s = new MongoSequence(getDataSource().getMongoInstance(), db, coll, key); MongoSequence s1 = new MongoSequence(getDataSource().getMongoInstance(), db, coll, key); Assert.assertEquals("A", s.getNext()); Assert.assertEquals("B", s1.getNext()); Assert.assertEquals("C", s.getNext()); Assert.assertEquals("D", s1.getNext()); }
@Test public void testSequence() { MongoSequence s = new MongoSequence(getDataSource().getMongoInstance(), db, coll, key); HashSet<String> set = new HashSet<String>(); for(int i = 0; i < 1000; i++) { String str = s.getNext(); Assert.assertFalse(set.contains(str)); set.add(str); } }