This commit is contained in:
Shreyash 2018-05-13 16:47:08 +05:30
parent 257bc7cc0f
commit 73db2e159f
1 changed files with 8 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.util.Arrays;
import java.util.Optional;
import org.junit.Test;
@ -80,4 +81,11 @@ public class CollectionsInteroperabilityUnitTest {
assertEquals(3, linkedSet.size());
}
@Test
public void givenParams_WhenVavrList_thenReturnJavaOptional() {
List<String> vavrList = List.of("Java");
Optional<String> optional = vavrList.toJavaOptional();
assertEquals("Java", optional.get());
}
}