// Path: src/main/java/javafixes/object/Either.java
// public static <L, R> Either<L, R> left(L value) {
//     return new Either.Left<>(value);
// }
// 
// Path: src/main/java/javafixes/object/Either.java
// public static <L, R> Either<L, R> right(R value) {
//     return new Either.Right<>(value);
// }
// 
// Path: src/test/java/javafixes/test/Random.java
// @SafeVarargs
// public static int randomInt(int from, int to, Function<Integer, Boolean>... validityConditions) {
//     return generateValidValue(
//             // typecast it to long as otherwise we could get int overflow
//             () -> (int) ((long) (Math.random() * ((long) to - (long) from + 1L)) + (long) from),
//             validityConditions
//     );
// }


import org.junit.Test;
import java.math.BigDecimal;
import java.util.NoSuchElementException;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
import static java.util.UUID.randomUUID;
import static javafixes.object.Either.left;
import static javafixes.object.Either.right;
import static javafixes.test.Random.randomInt;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
package javafixes.object;




public class EitherTest {

    private final Throwable expectedThrowable = new Throwable("Failed with a Throwable");
    private final Exception expectedException = new Exception("Failed with another Exception");
    private final RuntimeException expectedRuntimeException = new RuntimeException("Failed with yet another Exception");

    private final AtomicInteger leftCallCount = new AtomicInteger(0);
    private final AtomicInteger rightCallCount = new AtomicInteger(0);

    @Test
    public void shouldHandleLeft() throws Throwable {
        UUID value = randomUUID();
// Path: src/main/java/javafixes/object/Either.java
// public static <L, R> Either<L, R> left(L value) {
//     return new Either.Left<>(value);
// }
// 
// Path: src/main/java/javafixes/object/Either.java
// public static <L, R> Either<L, R> right(R value) {
//     return new Either.Right<>(value);
// }
// 
// Path: src/test/java/javafixes/test/Random.java
// @SafeVarargs
// public static int randomInt(int from, int to, Function<Integer, Boolean>... validityConditions) {
//     return generateValidValue(
//             // typecast it to long as otherwise we could get int overflow
//             () -> (int) ((long) (Math.random() * ((long) to - (long) from + 1L)) + (long) from),
//             validityConditions
//     );
// }


// Path: src/test/java/javafixes/object/EitherTest.java
import org.junit.Test;
import java.math.BigDecimal;
import java.util.NoSuchElementException;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
import static java.util.UUID.randomUUID;
import static javafixes.object.Either.left;
import static javafixes.object.Either.right;
import static javafixes.test.Random.randomInt;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;

package javafixes.object;




public class EitherTest {

    private final Throwable expectedThrowable = new Throwable("Failed with a Throwable");
    private final Exception expectedException = new Exception("Failed with another Exception");
    private final RuntimeException expectedRuntimeException = new RuntimeException("Failed with yet another Exception");

    private final AtomicInteger leftCallCount = new AtomicInteger(0);
    private final AtomicInteger rightCallCount = new AtomicInteger(0);

    @Test
    public void shouldHandleLeft() throws Throwable {
        UUID value = randomUUID();
        Either<UUID, Integer> either = Either.left(value);