// Path: src/main/java/io/datanerds/avropatch/exception/InvalidReferenceTokenException.java
// public class InvalidReferenceTokenException extends AvroPatchException {
// 
//     public InvalidReferenceTokenException(String message) {
//         super(message);
//     }
// }
// 
// Path: src/main/java/io/datanerds/avropatch/operation/Path.java
// public static final Path ROOT = new Path();
// 
// Path: src/main/java/io/datanerds/avropatch/operation/Path.java
// public static final String SLASH = "/";


import com.google.common.testing.EqualsTester;
import com.google.common.testing.NullPointerTester;
import io.datanerds.avropatch.exception.InvalidReferenceTokenException;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import static io.datanerds.avropatch.operation.Path.ROOT;
import static io.datanerds.avropatch.operation.Path.SLASH;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.Matchers.emptyIterableOf;
import static org.hamcrest.Matchers.iterableWithSize;
import static org.junit.Assert.assertThat;
package io.datanerds.avropatch.operation;



public class PathTest {

    @Rule
    public ExpectedException expectedException = ExpectedException.none();

    @Test
    public void equality() {
        new EqualsTester()
                .addEqualityGroup(Path.of("hello"), Path.of("hello"), Path.parse("/hello"), Path.parse("/hello/"))
                .addEqualityGroup(Path.of("hello", "world"), Path.of("hello", "world"), Path.parse("/hello/world"),
                        Path.of("hello").append("world"), Path.of("hello").append(Path.of("world")),
                        Path.of(Path.of("hello"), Path.of("world")))
                .addEqualityGroup(Path.of(), Path.parse(SLASH), ROOT)
                .testEquals();
    }

    @Test
    public void npe() {
        new NullPointerTester().testAllPublicStaticMethods(Path.class);
    }

    @Test
    public void numbersAndUnderscores() {
        Path path = Path.of("hello_", "123world-456");
        assertThat(path.toString(), is(equalTo("/hello_/123world-456")));
    }

    @Test
    public void noLeadingUnderscores() {
// Path: src/main/java/io/datanerds/avropatch/exception/InvalidReferenceTokenException.java
// public class InvalidReferenceTokenException extends AvroPatchException {
// 
//     public InvalidReferenceTokenException(String message) {
//         super(message);
//     }
// }
// 
// Path: src/main/java/io/datanerds/avropatch/operation/Path.java
// public static final Path ROOT = new Path();
// 
// Path: src/main/java/io/datanerds/avropatch/operation/Path.java
// public static final String SLASH = "/";


// Path: src/test/java/io/datanerds/avropatch/operation/PathTest.java
import com.google.common.testing.EqualsTester;
import com.google.common.testing.NullPointerTester;
import io.datanerds.avropatch.exception.InvalidReferenceTokenException;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import static io.datanerds.avropatch.operation.Path.ROOT;
import static io.datanerds.avropatch.operation.Path.SLASH;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.Matchers.emptyIterableOf;
import static org.hamcrest.Matchers.iterableWithSize;
import static org.junit.Assert.assertThat;

package io.datanerds.avropatch.operation;



public class PathTest {

    @Rule
    public ExpectedException expectedException = ExpectedException.none();

    @Test
    public void equality() {
        new EqualsTester()
                .addEqualityGroup(Path.of("hello"), Path.of("hello"), Path.parse("/hello"), Path.parse("/hello/"))
                .addEqualityGroup(Path.of("hello", "world"), Path.of("hello", "world"), Path.parse("/hello/world"),
                        Path.of("hello").append("world"), Path.of("hello").append(Path.of("world")),
                        Path.of(Path.of("hello"), Path.of("world")))
                .addEqualityGroup(Path.of(), Path.parse(SLASH), ROOT)
                .testEquals();
    }

    @Test
    public void npe() {
        new NullPointerTester().testAllPublicStaticMethods(Path.class);
    }

    @Test
    public void numbersAndUnderscores() {
        Path path = Path.of("hello_", "123world-456");
        assertThat(path.toString(), is(equalTo("/hello_/123world-456")));
    }

    @Test
    public void noLeadingUnderscores() {
        expectedException.expect(InvalidReferenceTokenException.class);