@Override
    public Iterable<Overlay> overlaysReversed() {
        return new Iterable<Overlay>() {

            /**
             * @since 6.1.0
             */
            private ListIterator<Overlay> bulletProofReverseListIterator() {
                while (true) {
                    try {
                        return mOverlayList.listIterator(mOverlayList.size());
                    } catch (final IndexOutOfBoundsException e) {
                        // thread-concurrency fix - in case an item is removed in a very inappropriate time
                        // cf. https://github.com/osmdroid/osmdroid/issues/1260
                    }
                }
            }

            @Override
            public Iterator<Overlay> iterator() {
                final ListIterator<Overlay> i = bulletProofReverseListIterator();

                return new Iterator<Overlay>() {
                    @Override
                    public boolean hasNext() {
                        return i.hasPrevious();
                    }

                    @Override
                    public Overlay next() {
                        return i.previous();
                    }

                    @Override
                    public void remove() {
                        i.remove();
                    }
                };
            }
        };
    }
@Test
    public void testOverlaysReversed() {
        final ListTest<Overlay> list = new ListTest<Overlay>() {

            private final DefaultOverlayManager defaultOverlayManager = new DefaultOverlayManager(null);

            @Override
            public void add() {
                defaultOverlayManager.add(new Overlay() {
                });
            }

            @Override
            public void remove() {
                defaultOverlayManager.remove(0);
            }

            @Override
            public Iterable<Overlay> reverseOrder() {
                return defaultOverlayManager.overlaysReversed();
            }

            @Override
            protected ListIterator<Overlay> unprotectedReverseListIterator() {
                throw new IllegalArgumentException(); // not to be used here
            }

            @Override
            public ListIterator<Overlay> reverseIterator() {
                throw new IllegalArgumentException(); // not to be used here
            }
        };

        final ListTester<Overlay> tester = new ListTester<>();
        tester.test(list);
    }