// Path: src/main/java/de/fesere/hypermedia/cj/exceptions/ElementNotFoundException.java
// public class ElementNotFoundException extends RuntimeException {
//     public ElementNotFoundException(String message) {
//         super(message);
//     }
// }
// 
// Path: src/main/java/de/fesere/hypermedia/cj/model/builder/DataEntryFactory.java
// public static DataEntry createEmpty(String name, String prompt) {
//     return new StringDataEntry(name, "", prompt);
// }


import de.fesere.hypermedia.cj.exceptions.ElementNotFoundException;
import org.junit.Test;
import java.net.URI;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import static de.fesere.hypermedia.cj.model.builder.DataEntryFactory.createEmpty;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.core.Is.is;
package de.fesere.hypermedia.cj.model;




public class QueryTest extends SerializationTestBase{

    private URI BASE_URI = URI.create("http://base.com");

    @Test
    public void testCollectionWithOnlyQuery() {
        Collection result = readCollection("examples/query-collection.json");

        assertThat(result.getQueries(), hasSize(1));
        assertThat(result.getQueries().get(0).getData(),hasSize(1) );
    }


    @Test
    public void testBuildURI_noQueryStringIfQueryRemainsEmpty() {
        Query classUnderTest = createBaseQueryWith3Entries();

// Path: src/main/java/de/fesere/hypermedia/cj/exceptions/ElementNotFoundException.java
// public class ElementNotFoundException extends RuntimeException {
//     public ElementNotFoundException(String message) {
//         super(message);
//     }
// }
// 
// Path: src/main/java/de/fesere/hypermedia/cj/model/builder/DataEntryFactory.java
// public static DataEntry createEmpty(String name, String prompt) {
//     return new StringDataEntry(name, "", prompt);
// }


// Path: src/test/java/de/fesere/hypermedia/cj/model/QueryTest.java
import de.fesere.hypermedia.cj.exceptions.ElementNotFoundException;
import org.junit.Test;
import java.net.URI;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import static de.fesere.hypermedia.cj.model.builder.DataEntryFactory.createEmpty;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.core.Is.is;

package de.fesere.hypermedia.cj.model;




public class QueryTest extends SerializationTestBase{

    private URI BASE_URI = URI.create("http://base.com");

    @Test
    public void testCollectionWithOnlyQuery() {
        Collection result = readCollection("examples/query-collection.json");

        assertThat(result.getQueries(), hasSize(1));
        assertThat(result.getQueries().get(0).getData(),hasSize(1) );
    }


    @Test
    public void testBuildURI_noQueryStringIfQueryRemainsEmpty() {
        Query classUnderTest = createBaseQueryWith3Entries();

        URI uri = classUnderTest.buildURI();