### Question:
RoundRobin implements Iterable<T> { RoundRobin(List<T> list) { this.list = list; this.size = list.size(); } RoundRobin(List<T> list); @Override Iterator<T> iterator(); static RoundRobin<T> of(List<T> list);  }### Answer:
@Test @DisplayName("Test Round Robin") void testRoundRobin() { RoundRobin<String> rb = RoundRobin.of(Arrays.asList("foo", "bar", "baz")); Iterator<String> it = rb.iterator(); assertThat(it.hasNext()).isTrue(); assertThatExceptionOfType(UnsupportedOperationException.class).isThrownBy(it::remove); assertThat(it.next()).isEqualTo("foo"); assertThat(it.next()).isEqualTo("bar"); assertThat(it.next()).isEqualTo("baz"); assertThat(it.next()).isEqualTo("foo"); assertThat(it.hasNext()).isTrue(); }