Replace AbstractSoneCommand with Kotlin version
[Sone.git] / src / test / kotlin / net / pterodactylus / sone / fcp / UnlockSoneCommandTest.kt
index 5edc03e..f520349 100644 (file)
@@ -1,7 +1,6 @@
 package net.pterodactylus.sone.fcp
 
 import net.pterodactylus.sone.core.Core
-import net.pterodactylus.sone.test.asOptional
 import net.pterodactylus.sone.test.whenever
 import org.hamcrest.MatcherAssert.assertThat
 import org.hamcrest.Matchers.equalTo
@@ -18,14 +17,14 @@ class UnlockSoneCommandTest : SoneCommandTest() {
 
        @Before
        fun setupSones() {
-               whenever(core.getSone("RemoteSoneId")).thenReturn(remoteSone.asOptional())
-               whenever(core.getSone("LocalSoneId")).thenReturn(localSone.asOptional())
+               whenever(core.getSone("RemoteSoneId")).thenReturn(remoteSone)
+               whenever(core.getSone("LocalSoneId")).thenReturn(localSone)
                whenever(localSone.id).thenReturn("LocalSoneId")
        }
 
        @Test
        fun `command requires write access`() {
-               assertThat(command.requiresWriteAccess(), equalTo(true))
+               assertThat(command.requiresWriteAccess, equalTo(true))
        }
 
        @Test