public HDPath parent() {
        return unmodifiableList.size() > 1 ?
                HDPath.of(hasPrivateKey, unmodifiableList.subList(0, unmodifiableList.size() - 1)) :
                HDPath.of(hasPrivateKey, Collections.emptyList());
    }
@Test
    public void testParent() {
        HDPath path1 = HDPath.parsePath("m/0H/1H");

        assertEquals(HDPath.parsePath("m/0H"), path1.parent());

        HDPath path2 = HDPath.parsePath("m/0H");

        assertEquals(HDPath.parsePath(""), path2.parent());

        HDPath path3 = HDPath.parsePath("");

        assertEquals(HDPath.parsePath(""), path3.parent());
    }