1 package net.pterodactylus.sone.utils
3 import freenet.support.api.Bucket
4 import net.pterodactylus.sone.test.mock
6 import org.mockito.Mockito.verify
7 import kotlin.test.fail
10 * Unit test for [freenet.support.api.Bucket]-related utilities.
14 private val bucket = mock<Bucket>()
17 fun `bucket is freed after use without exception`() {
23 fun `bucket is freed after use with exceptions`() {
25 bucket.use { throw Exception() }
26 @Suppress("UNREACHABLE_CODE")
28 } catch (e: Exception) {