X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FSoneInserterTest.java;h=32926e8c30064dd980e786540da059473e95c0ff;hp=51947d1e3c7e3f712a1f95d27761acf0fdc764ef;hb=62573c314957b1851f4fbe693b8746686caa940a;hpb=d338aacec01efa636f96c5f8aab11b2345147691
diff --git a/src/test/java/net/pterodactylus/sone/core/SoneInserterTest.java b/src/test/java/net/pterodactylus/sone/core/SoneInserterTest.java
index 51947d1..32926e8 100644
--- a/src/test/java/net/pterodactylus/sone/core/SoneInserterTest.java
+++ b/src/test/java/net/pterodactylus/sone/core/SoneInserterTest.java
@@ -1,6 +1,5 @@
package net.pterodactylus.sone.core;
-import static com.google.common.base.Optional.of;
import static com.google.common.io.ByteStreams.toByteArray;
import static com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor;
import static java.lang.System.currentTimeMillis;
@@ -49,8 +48,6 @@ import org.mockito.stubbing.Answer;
/**
* Unit test for {@link SoneInserter} and its subclasses.
- *
- * @author David âBombeâ Roden
*/
public class SoneInserterTest {
@@ -62,7 +59,7 @@ public class SoneInserterTest {
public void setupCore() {
UpdateChecker updateChecker = mock(UpdateChecker.class);
when(core.getUpdateChecker()).thenReturn(updateChecker);
- when(core.getSone(anyString())).thenReturn(Optional.absent());
+ when(core.getSone(anyString())).thenReturn(null);
}
@Test
@@ -78,7 +75,7 @@ public class SoneInserterTest {
when(sone.getInsertUri()).thenReturn(insertUri);
when(sone.getFingerprint()).thenReturn(fingerprint);
when(sone.getRootAlbum()).thenReturn(mock(Album.class));
- when(core.getSone(anyString())).thenReturn(of(sone));
+ when(core.getSone(anyString())).thenReturn(sone);
return sone;
}
@@ -223,7 +220,7 @@ public class SoneInserterTest {
new SoneInserter(core, eventBus, freenetInterface, "SoneId",
soneModificationDetector, 1);
when(soneModificationDetector.isEligibleForInsert()).thenReturn(true);
- when(core.getSone("SoneId")).thenReturn(Optional.absent());
+ when(core.getSone("SoneId")).thenReturn(null);
soneInserter.serviceRun();
}