// Path: src/main/java/org/jusecase/builders/BuilderException.java
// public class BuilderException extends RuntimeException {
//     public BuilderException(String message) {
//         super(message);
//     }
// 
//     public BuilderException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }
// 
// Path: src/main/java/org/jusecase/Builders.java
// public static <T> T a(final Builder<T> builder) {
//     return builder.build();
// }
// 
// Path: src/main/java/org/jusecase/Builders.java
// public static PathBuilder path() {
//     return new PathBuilder();
// }


import org.junit.Test;
import org.jusecase.builders.BuilderException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import static org.junit.Assert.assertEquals;
import static org.jusecase.Builders.a;
import static org.jusecase.Builders.path;
package org.jusecase.builders.io;




public class PathBuilderTest {
    @Test
    public void defaultPath() {
        assertEquals(Paths.get(""), a(path()));
    }

    @Test(expected = NullPointerException.class)
    public void nullResource() {
        a(path().withResource(null));
    }

    @Test(expected = BuilderException.class)
    public void resourceThatDoesNotExist() {
        a(path().withResource("unknown.txt"));
    }

    @Test
    public void resourceThatExists() throws Exception {
// Path: src/main/java/org/jusecase/builders/BuilderException.java
// public class BuilderException extends RuntimeException {
//     public BuilderException(String message) {
//         super(message);
//     }
// 
//     public BuilderException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }
// 
// Path: src/main/java/org/jusecase/Builders.java
// public static <T> T a(final Builder<T> builder) {
//     return builder.build();
// }
// 
// Path: src/main/java/org/jusecase/Builders.java
// public static PathBuilder path() {
//     return new PathBuilder();
// }


// Path: src/test/java/org/jusecase/builders/io/PathBuilderTest.java
import org.junit.Test;
import org.jusecase.builders.BuilderException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import static org.junit.Assert.assertEquals;
import static org.jusecase.Builders.a;
import static org.jusecase.Builders.path;

package org.jusecase.builders.io;




public class PathBuilderTest {
    @Test
    public void defaultPath() {
        assertEquals(Paths.get(""), a(path()));
    }

    @Test(expected = NullPointerException.class)
    public void nullResource() {
        a(path().withResource(null));
    }

    @Test(expected = BuilderException.class)
    public void resourceThatDoesNotExist() {
        a(path().withResource("unknown.txt"));
    }

    @Test
    public void resourceThatExists() throws Exception {
        Path path = a(path().withResource("testresource.txt"));