X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FSoneCommandTest.kt;h=6370acc7fba6da3ae3e1ca01bf9e4b3afb7a6a15;hp=aa38f8846134ce7ade1de7d9020c6c579ecd8aab;hb=8e313509a42a8c638fcac018dd73dd975bf9cb68;hpb=943bbf6848a5975cb994f75f812ef215af62475f diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt index aa38f88..6370acc 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt @@ -1,6 +1,5 @@ package net.pterodactylus.sone.fcp -import com.google.common.base.Optional import com.google.common.base.Optional.absent import freenet.support.SimpleFieldSet import net.pterodactylus.sone.core.Core @@ -39,7 +38,7 @@ abstract class SoneCommandTest { @Before fun setupCore() { - whenever(core.getSone(anyString())).thenReturn(absent()) + whenever(core.getSone(anyString())).thenReturn(null) whenever(core.getPost(anyString())).thenReturn(absent()) whenever(core.getPostReply(anyString())).thenReturn(absent()) } @@ -92,7 +91,7 @@ abstract class SoneCommandTest { fun requestWithValidRemoteSoneParameterResultsInFcpException() { parameters += "Sone" to "RemoteSoneId" - whenever(core.getSone("RemoteSoneId")).thenReturn(Optional.of(remoteSone)) + whenever(core.getSone("RemoteSoneId")).thenReturn(remoteSone) executeCommandAndExpectFcpException() }