BerkeleyDBIdentifierMap idSource = new BerkeleyDBIdentifierMap(dbEnvironment, fudgeContext);
idSource.start();
Map<String, Long> identifiers = new HashMap<String, Long>();
LongSet seenIdentifiers = new LongOpenHashSet();
for (int i = 0; i < 10; i++) {
String valueName = "value-" + i;
ValueSpecification valueSpec = getValueSpec(valueName);
long identifier = idSource.getIdentifier(valueSpec);
assertFalse(seenIdentifiers.contains(identifier));
seenIdentifiers.add(identifier);
identifiers.put(valueName, identifier);
}
for (int j = 0; j < 5; j++) {
Long2ObjectMap<ValueSpecification> valueSpecs = idSource.getValueSpecifications(seenIdentifiers);
assertEquals(seenIdentifiers.size(), valueSpecs.size());
for (int i = 0; i < 10; i++) {
String valueName = "value-" + i;
ValueSpecification valueSpec = getValueSpec(valueName);
long identifier = idSource.getIdentifier(valueSpec);
long existingIdentifier = identifiers.get(valueName);