Use new hostname for KickAssTorrents
[rhynodge.git] / src / test / java / net / pterodactylus / rhynodge / states / StateManagerTest.java
index a7361f9..839b389 100644 (file)
@@ -2,18 +2,22 @@ package net.pterodactylus.rhynodge.states;
 
 import static com.google.common.base.Charsets.UTF_8;
 import static com.google.common.base.Objects.equal;
+import static org.apache.log4j.Level.OFF;
+import static org.apache.log4j.Logger.getLogger;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.is;
 
 import java.io.File;
 import java.io.IOException;
+import java.util.Optional;
 
 import net.pterodactylus.rhynodge.State;
+import net.pterodactylus.rhynodge.states.StateManager.StateDirectory;
 
 import com.fasterxml.jackson.annotation.JsonProperty;
-import com.google.common.base.Optional;
 import com.google.common.io.Files;
 import org.hamcrest.Matchers;
+import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
@@ -30,10 +34,15 @@ public class StateManagerTest {
        private final File statePath;
        private final StateManager stateManager;
 
+       @BeforeClass
+       public static void deactivateLogging() {
+               getLogger(StateManager.class).setLevel(OFF);
+       }
+
        public StateManagerTest() throws IOException {
                tempFolder.create();
                statePath = tempFolder.newFolder();
-               stateManager = new StateManager(statePath.getPath());
+               stateManager = new StateManager(StateDirectory.of(statePath.getPath()));
        }
 
        @Test