package com.oguerreiro.resilient.domain;

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

public class InputDataUploadLogTestSamples {

    private static final Random random = new Random();
    private static final AtomicLong longCount = new AtomicLong(random.nextInt() + (2 * Integer.MAX_VALUE));
    private static final AtomicInteger intCount = new AtomicInteger(random.nextInt() + (2 * Short.MAX_VALUE));

    public static InputDataUploadLog getInputDataUploadLogSample1() {
        return new InputDataUploadLog().id(1L).logMessage("logMessage1").creationUsername("creationUsername1").version(1);
    }

    public static InputDataUploadLog getInputDataUploadLogSample2() {
        return new InputDataUploadLog().id(2L).logMessage("logMessage2").creationUsername("creationUsername2").version(2);
    }

    public static InputDataUploadLog getInputDataUploadLogRandomSampleGenerator() {
        return new InputDataUploadLog()
            .id(longCount.incrementAndGet())
            .logMessage(UUID.randomUUID().toString())
            .creationUsername(UUID.randomUUID().toString())
            .version(intCount.incrementAndGet());
    }
}
