1 package net.pterodactylus.sone.utils
3 import com.google.common.base.Optional.fromNullable
4 import org.hamcrest.MatcherAssert.assertThat
5 import org.hamcrest.Matchers.contains
11 fun testMapPresent() {
12 val originalList = listOf(1, 2, null, 3, null)
13 assertThat(originalList.mapPresent { fromNullable(it) }, contains(1, 2, 3))