639dc90849540fc85d01f48f5c6ee0c16cfe71ed
[Sone.git] / src / test / kotlin / net / pterodactylus / sone / utils / IterablesTest.kt
1 package net.pterodactylus.sone.utils
2
3 import com.google.common.base.Optional.fromNullable
4 import org.hamcrest.MatcherAssert.assertThat
5 import org.hamcrest.Matchers.contains
6 import org.junit.Test
7
8 class IterablesTest {
9
10         @Test
11         fun testMapPresent() {
12                 val originalList = listOf(1, 2, null, 3, null)
13                 assertThat(originalList.mapPresent { fromNullable(it) }, contains(1, 2, 3))
14         }
15
16 }