// Path: benchmarks-api/src/main/java/uk/co/real_logic/benchmarks/remote/LoadTestRig.java
// static final int MINIMUM_NUMBER_OF_CPU_CORES = 6;


import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.Mockito.*;
import static uk.co.real_logic.benchmarks.remote.LoadTestRig.MINIMUM_NUMBER_OF_CPU_CORES;
import static uk.co.real_logic.benchmarks.remote.MessageTransceiver.CHECKSUM;
import org.HdrHistogram.Histogram;
import org.agrona.concurrent.IdleStrategy;
import org.agrona.concurrent.NanoClock;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.io.TempDir;
import org.mockito.InOrder;
import java.io.File;
import java.io.PrintStream;
import java.nio.file.Path;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.concurrent.TimeUnit.SECONDS;

    @Test
    void constructorThrowsNullPointerExceptionIfConfigurationIsNull()
    {
        assertThrows(NullPointerException.class, () -> new LoadTestRig(null));
    }

    @Test
    void runPerformsWarmupBeforeMeasurement() throws Exception
    {
        final long nanoTime = SECONDS.toNanos(123);
        final NanoClock clock = () -> nanoTime;

        configuration = new Configuration.Builder()
            .warmupIterations(1)
            .warmupMessageRate(1)
            .iterations(1)
            .messageRate(1)
            .messageTransceiverClass(configuration.messageTransceiverClass())
            .idleStrategy(idleStrategy)
            .outputDirectory(configuration.outputDirectory())
            .outputFileNamePrefix("test")
            .build();

        final LoadTestRig loadTestRig = new LoadTestRig(
            configuration,
            messageTransceiver,
            out,
            clock,
            persistedHistogram,
// Path: benchmarks-api/src/main/java/uk/co/real_logic/benchmarks/remote/LoadTestRig.java
// static final int MINIMUM_NUMBER_OF_CPU_CORES = 6;


// Path: benchmarks-api/src/test/java/uk/co/real_logic/benchmarks/remote/LoadTestRigTest.java
import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.Mockito.*;
import static uk.co.real_logic.benchmarks.remote.LoadTestRig.MINIMUM_NUMBER_OF_CPU_CORES;
import static uk.co.real_logic.benchmarks.remote.MessageTransceiver.CHECKSUM;
import org.HdrHistogram.Histogram;
import org.agrona.concurrent.IdleStrategy;
import org.agrona.concurrent.NanoClock;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.api.io.TempDir;
import org.mockito.InOrder;
import java.io.File;
import java.io.PrintStream;
import java.nio.file.Path;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.concurrent.TimeUnit.SECONDS;


    @Test
    void constructorThrowsNullPointerExceptionIfConfigurationIsNull()
    {
        assertThrows(NullPointerException.class, () -> new LoadTestRig(null));
    }

    @Test
    void runPerformsWarmupBeforeMeasurement() throws Exception
    {
        final long nanoTime = SECONDS.toNanos(123);
        final NanoClock clock = () -> nanoTime;

        configuration = new Configuration.Builder()
            .warmupIterations(1)
            .warmupMessageRate(1)
            .iterations(1)
            .messageRate(1)
            .messageTransceiverClass(configuration.messageTransceiverClass())
            .idleStrategy(idleStrategy)
            .outputDirectory(configuration.outputDirectory())
            .outputFileNamePrefix("test")
            .build();

        final LoadTestRig loadTestRig = new LoadTestRig(
            configuration,
            messageTransceiver,
            out,
            clock,
            persistedHistogram,
            MINIMUM_NUMBER_OF_CPU_CORES * 2);