// 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;
        Path path = Path.of("hello", "world");
        assertThat(path.subPaths(), allOf(
                iterableWithSize(2),
                hasItems(Path.of("hello"), Path.parse("/hello/world"))));
    }

    @Test
    public void subPathsOfRoot() {
        assertThat(ROOT.subPaths(), emptyIterableOf(Path.class));
    }

    @Test
    public void partsIsUnmodifiable() {
        Path path = Path.of("hello", "world");
        expectedException.expect(UnsupportedOperationException.class);
        path.parts().add("hello");
    }

    @Test
    public void pathAsString() {
        assertThat(Path.of("hello", "world").toString(), is(equalTo("/hello/world")));
    }

    @Test
    public void rootAsString() {
        assertThat(ROOT.toString(), is(equalTo("/")));
    }

    @Test(expected = InvalidReferenceTokenException.class)
    public void appendValidates() {
// 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;

        Path path = Path.of("hello", "world");
        assertThat(path.subPaths(), allOf(
                iterableWithSize(2),
                hasItems(Path.of("hello"), Path.parse("/hello/world"))));
    }

    @Test
    public void subPathsOfRoot() {
        assertThat(ROOT.subPaths(), emptyIterableOf(Path.class));
    }

    @Test
    public void partsIsUnmodifiable() {
        Path path = Path.of("hello", "world");
        expectedException.expect(UnsupportedOperationException.class);
        path.parts().add("hello");
    }

    @Test
    public void pathAsString() {
        assertThat(Path.of("hello", "world").toString(), is(equalTo("/hello/world")));
    }

    @Test
    public void rootAsString() {
        assertThat(ROOT.toString(), is(equalTo("/")));
    }

    @Test(expected = InvalidReferenceTokenException.class)
    public void appendValidates() {
        ROOT.append(".'!#(^((*(_$,-");