📅  最后修改于: 2022-03-11 14:52:25.258000             🧑  作者: Mango
@Test
public void whenConvertIterableToListUsingJava8_thenSuccess() {
List result = new ArrayList();
iterable.forEach(result::add);
assertThat(result, contains("john", "tom", "jane"));
}