Merge "maven compiler plugin for linux machines with maven version 2.x"
diff --git a/pom.xml b/pom.xml
index 2f9e9d5..db97761 100644
--- a/pom.xml
+++ b/pom.xml
@@ -99,10 +99,20 @@
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
<outputDirectory>${basedir}/target/classes</outputDirectory>
<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.3</version>
+ <configuration>
+ <compilerVersion>1.7</compilerVersion>
+ <source>1.7</source>
+ <target>1.7</target>
+ </configuration>
+ </plugin>
<!--
Formatter plugin for Eclipse based coding conventions
http://maven-java-formatter-plugin.googlecode.com/svn/site/0.4/usage.html
- -->
+ -->
<plugin>
<groupId>com.googlecode.maven-java-formatter-plugin</groupId>
<artifactId>maven-java-formatter-plugin</artifactId>
diff --git a/src/test/java/de/ids_mannheim/korap/query/serialize/CollectionQueryDuplicateTest.java b/src/test/java/de/ids_mannheim/korap/query/serialize/CollectionQueryDuplicateTest.java
new file mode 100644
index 0000000..d3c1faa
--- /dev/null
+++ b/src/test/java/de/ids_mannheim/korap/query/serialize/CollectionQueryDuplicateTest.java
@@ -0,0 +1,32 @@
+package de.ids_mannheim.korap.query.serialize;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.Test;
+
+import java.io.IOException;
+
+/**
+ * @author hanl
+ * @date 28/07/2015
+ */
+public class CollectionQueryDuplicateTest {
+
+ @Test
+ public void testCollectionQueryDuplicateThrowsAssertionException() {
+ QuerySerializer serializer = new QuerySerializer();
+ serializer.setQuery("[base=Haus]", "poliqarp");
+ serializer.setCollection("textClass=politik & corpusID=WPD");
+ ObjectMapper m = new ObjectMapper();
+ try {
+ JsonNode first = m.readTree(serializer.toJSON());
+ JsonNode second = m.readTree(serializer.toJSON());
+
+ assert first.at("/collection").equals(second.at("/collection"));
+
+ }catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+}