@Override
    public List<E> subList(int fromIndex, int toIndex) {
        return Collections.unmodifiableList(underlying).subList(fromIndex, toIndex);
    }
@Test
    public void testSubList() {
        BoundedList<Integer> list = BoundedList.newArrayBacked(3);
        list.add(1);
        list.add(2);
        list.add(3);
        assertEquals(Arrays.asList(2), list.subList(1, 2));
        assertThrows(UnsupportedOperationException.class,
            () -> list.subList(1, 2).remove(2));
    }