@@ -0,0 +1,2127 @@
+package co.phoenixlab.common.lang;%0A%0Aimport org.junit.*;%0A%0Aimport java.util.Optional;%0A%0Aimport static org.junit.Assert.*;%0A%0Apublic class SafeNavTest %7B%0A%0A%0A    @Test%0A    public void testOf() throws Exception %7B%0A        Object o = new Object();%0A        SafeNav%3CObject%3E nav = SafeNav.of(o);%0A        assertNotNull(nav);%0A    %7D%0A%0A    @Test%0A    public void testOfOptional() throws Exception %7B%0A        Optional%3CObject%3E optional = Optional.empty();%0A        SafeNav%3CObject%3E nav = SafeNav.ofOptional(optional);%0A        assertNotNull(nav);%0A    %7D%0A%0A    @Test%0A    public void testGet() throws Exception %7B%0A        Object o = new Object();%0A        SafeNav%3CObject%3E nav = SafeNav.of(o);%0A        Object o1 = nav.get();%0A        assertSame(o, o1);%0A    %7D%0A%0A    @Test%0A    public void testGetNull() throws Exception %7B%0A        SafeNav%3CObject%3E nav = SafeNav.of(null);%0A        Object o1 = nav.get();%0A        assertNull(o1);%0A    %7D%0A%0A    @Test%0A    public void testGetFunct() throws Exception %7B%0A        Object o = new Object() %7B%0A            @Override%0A            public String toString() %7B%0A                return %22potato%22;%0A            %7D%0A        %7D;%0A        SafeNav%3CObject%3E nav = SafeNav.of(o);%0A        String s = nav.get(Object::toString);%0A        assertNotNull(s);%0A        assertEquals(o.toString(), s);%0A    %7D%0A%0A    @Test%0A    public void testGetFunctNull() throws Exception %7B%0A        SafeNav%3CObject%3E nav = SafeNav.of(null);%0A        String s = nav.get(Object::toString);%0A        assertNull(s);%0A    %7D%0A%0A    @Test%0A    public void testOrElse() throws Exception %7B%0A        Object o = new Object();%0A        Object o1 = new Object();%0A        SafeNav%3CObject%3E nav = SafeNav.of(o);%0A        Object o2 = nav.orElse(o1);%0A        assertSame(o, o2);%0A        assertNotSame(o1, o2);%0A    %7D%0A%0A    @Test%0A    public void testOrElseNull() throws Exception %7B%0A        Object o1 = new Object();%0A        SafeNav%3CObject%3E nav = SafeNav.of(null);%0A        Object o2 = nav.orElse(o1);%0A        assertSame(o1, o2);%0A    %7D%0A%0A    @Test%0A    public void testOrElseNullNull() throws Exception %7B%0A        SafeNav%3CObject%3E nav = SafeNav.of(null);%0A        Object o = nav.orElse(null);%0A        assertNull(o);%0A    %7D%0A%0A%7D%0A

Add initial SafeNav testing