All Downloads are FREE. Search and download functionalities are using the official Maven repository.

handlebars.JavaSpring.TestUtils.mustache Maven / Gradle / Ivy

There is a newer version: 1.0.54
Show newest version
package {{basePackage}};

import java.util.Random;
import java.util.concurrent.atomic.AtomicLong;

public class TestUtils {
    private static final AtomicLong atomicId = createAtomicId();

    public static long nextId() {
        return atomicId.getAndIncrement();
    }

    private static AtomicLong createAtomicId() {
        int baseId = new Random(System.currentTimeMillis()).nextInt(1000000) + 20000;
        return new AtomicLong((long) baseId);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy