### Question:
ReplicatedIdGenerator implements IdGenerator { @Override public synchronized long nextId() { long id = getReusableId(); if ( id != IdContainer.NO_RESULT ) { return id; } long nextId = idQueue.nextId(); if ( nextId == VALUE_REPRESENTING_NULL ) { acquireNextIdBatch(); nextId = idQueue.nextId(); } highId = max( highId, nextId + 1 ); return nextId; } ReplicatedIdGenerator( FileSystemAbstraction fs, File file, IdType idType, LongSupplier highId,
            ReplicatedIdRangeAcquirer acquirer, LogProvider logProvider, int grabSize, boolean aggressiveReuse ); @Override void close(); @Override void freeId( long id ); @Override long getHighId(); @Override void setHighId( long id ); @Override long getHighestPossibleIdInUse(); @Override long getNumberOfIdsInUse(); @Override synchronized long nextId(); @Override synchronized IdRange nextIdBatch( int size ); @Override long getDefragCount(); @Override void delete(); @Override String toString();  }### Answer:
@Test( expected = IllegalStateException.class ) public void shouldThrowIfAdjustmentFailsDueToInconsistentValues() { ReplicatedIdRangeAcquirer rangeAcquirer = mock( ReplicatedIdRangeAcquirer.class ); when( rangeAcquirer.acquireIds( IdType.NODE ) ).thenReturn( allocation( 3, 21, 21 ) ); idGenerator = getReplicatedIdGenerator( 10, 42L, rangeAcquirer ); idGenerator.nextId(); }