Fixed collection cache test.

Change-Id: I2cd954deeda2754408e15bd6b073ec59363e108e
diff --git a/pom.xml b/pom.xml
index fb0dc79..26308bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -229,6 +229,7 @@
 				<version>2.5.1</version>
 				<inherited>true</inherited>
 				<configuration>
+				    <argLine>-Xms512m</argLine>
 					<showWarnings>true</showWarnings>
 					<source>1.7</source>
 					<target>1.7</target>
@@ -284,7 +285,8 @@
 				<artifactId>maven-surefire-plugin</artifactId>
 				<version>2.22.1</version>
 				<configuration>
-          <useSystemClassLoader>false</useSystemClassLoader>
+          		    <useSystemClassLoader>false</useSystemClassLoader>
+          		    <argLine>-Xms512m</argLine>
 					<excludes>
 						<exclude>**/benchmark/*</exclude>
 						<exclude>**/TestWPDIndex.java</exclude>
diff --git a/src/test/java/de/ids_mannheim/korap/collection/TestCollectionCache.java b/src/test/java/de/ids_mannheim/korap/collection/TestCollectionCache.java
index 5591494..9b73eb2 100644
--- a/src/test/java/de/ids_mannheim/korap/collection/TestCollectionCache.java
+++ b/src/test/java/de/ids_mannheim/korap/collection/TestCollectionCache.java
@@ -9,16 +9,20 @@
 import de.ids_mannheim.korap.KrillCollection;
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.index.FieldDocument;
+import net.sf.ehcache.Cache;
 
 public class TestCollectionCache {
 
     @Test
     public void testNullCache() throws IOException{
+        Cache temp = KrillCollection.cache;
         assertTrue(KrillCollection.cache != null);
         
         KrillCollection.cache = null;
         KrillIndex ki = new KrillIndex();
         ki.addDoc(new FieldDocument());
         ki.commit();
+        
+        KrillCollection.cache = temp;
     }
 }