// 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 InputStreamBuilder inputStream() {
//     return new InputStreamBuilder();
// }


import org.apache.commons.io.IOUtils;
import org.junit.Test;
import org.jusecase.builders.BuilderException;
import java.io.InputStream;
import static org.junit.Assert.assertEquals;
import static org.jusecase.Builders.a;
import static org.jusecase.Builders.inputStream;
package org.jusecase.builders.streams;




public class InputStreamBuilderTest {
    @Test
    public void inputStreamWithoutAdjustments() throws Exception {
        inputStreamIsEqualTo(a(inputStream()), "");
    }

    @Test(expected = NullPointerException.class)
    public void inputStreamWithNullString() throws Exception {
        a(inputStream().withString(null));
    }

    @Test
    public void inputStreamWithString() throws Exception {
        inputStreamIsEqualTo(a(inputStream().withString("1234")), "1234");
    }

    @Test(expected = NullPointerException.class)
    public void inputStreamWithNullResource() throws Exception {
        a(inputStream().withResource(null));
    }

    @Test(expected = BuilderException.class)
    public void inputStreamWithResourceThatDoesNotExist() throws Exception {
        a(inputStream().withResource("unknown.txt"));
    }

    @Test
// 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 InputStreamBuilder inputStream() {
//     return new InputStreamBuilder();
// }


// Path: src/test/java/org/jusecase/builders/streams/InputStreamBuilderTest.java
import org.apache.commons.io.IOUtils;
import org.junit.Test;
import org.jusecase.builders.BuilderException;
import java.io.InputStream;
import static org.junit.Assert.assertEquals;
import static org.jusecase.Builders.a;
import static org.jusecase.Builders.inputStream;

package org.jusecase.builders.streams;




public class InputStreamBuilderTest {
    @Test
    public void inputStreamWithoutAdjustments() throws Exception {
        inputStreamIsEqualTo(a(inputStream()), "");
    }

    @Test(expected = NullPointerException.class)
    public void inputStreamWithNullString() throws Exception {
        a(inputStream().withString(null));
    }

    @Test
    public void inputStreamWithString() throws Exception {
        inputStreamIsEqualTo(a(inputStream().withString("1234")), "1234");
    }

    @Test(expected = NullPointerException.class)
    public void inputStreamWithNullResource() throws Exception {
        a(inputStream().withResource(null));
    }

    @Test(expected = BuilderException.class)
    public void inputStreamWithResourceThatDoesNotExist() throws Exception {
        a(inputStream().withResource("unknown.txt"));
    }

    @Test
    public void inputStreamWithResource() throws Exception {