@Override
    public void remove() {
        if (currentIterator == null) {
            throw new IllegalStateException("next() has not yet been called");
        }

        currentIterator.remove();
    }
@Test
	public void testRemoveWithEmpty() {
		Assertions.assertThrows(IllegalStateException.class, () -> {
			List<Integer> emptyList = new ArrayList<>();
			CompositeIterable<Integer> compositeIterable = new CompositeIterable<Integer>(
					emptyList);
			compositeIterable.iterator().remove();
		});
	}