Configuration { public int warmUpIterations() { return warmUpIterations; } private  Configuration(final Builder builder); int warmUpIterations(); int iterations(); int numberOfMessages(); int batchSize(); int messageLength(); Class<? extends MessageTransceiver> messageTransceiverClass(); IdleStrategy sendIdleStrategy(); IdleStrategy receiveIdleStrategy(); Path outputDirectory(); String outputFileNamePrefix(); String toString(); static Configuration fromSystemProperties(); static Path certificatesDirectory(); static final int DEFAULT_WARM_UP_ITERATIONS; static final int DEFAULT_ITERATIONS; static final int DEFAULT_BATCH_SIZE; static final int MIN_MESSAGE_LENGTH; static final String WARM_UP_ITERATIONS_PROP_NAME; static final String ITERATIONS_PROP_NAME; static final String MESSAGES_PROP_NAME; static final String BATCH_SIZE_PROP_NAME; static final String MESSAGE_LENGTH_PROP_NAME; static final String SEND_IDLE_STRATEGY_PROP_NAME; static final String RECEIVE_IDLE_STRATEGY_PROP_NAME; static final String MESSAGE_TRANSCEIVER_PROP_NAME; static final String OUTPUT_DIRECTORY_PROP_NAME; static final String OUTPUT_FILE_NAME_PREFIX_PROP_NAME; }
@Test void throwsIllegalArgumentExceptionIfWarmUpIterationsIsANegativeNumber() { final Builder builder = new Builder() .warmUpIterations(-1); final IllegalArgumentException ex = assertThrows(IllegalArgumentException.class, builder::build); assertEquals("Warm-up iterations cannot be less than 0, got: -1", ex.getMessage()); }