private void index() {
        IntStream.range(0, this.size()).forEach(i -> preferences.setProperty(toProperty(this.get(i), prefix), i));
    }
@Test
    public void testIndex() {
        BookmarkCollection c = new BookmarkCollection(new NullLocal("", "f")) {
            @Override
            protected void save(Host bookmark) {
                assertNotNull(bookmark.getUuid());
            }
        };
        final Host d = new Host(new TestProtocol(), "c");
        final Host b = new Host(new TestProtocol(), "b");
        final Host a = new Host(new TestProtocol(), "a");
        c.add(a);
        c.add(b);
        assertEquals(a, c.get(0));
        assertEquals(b, c.get(1));
        c.add(0, d);
        assertEquals(d, c.get(0));
        assertEquals(a, c.get(1));
        assertEquals(b, c.get(2));
    }