void () { assertNull(JBIterable.empty().first()); assertNull(JBIterable.empty().last()); assertNull(JBIterable.empty().single()); assertEquals("a", JBIterable.generate("a", o -> o + "a").first()); assertEquals("aaa", JBIterable.generate("a", o -> o + "a").take(3).last()); assertEquals("a", JBIterable.generate("a", o -> o + "a").take(1).single()); assertNull(JBIterable.generate("a", o -> o + "a").take(2).single()); assertEquals("a", JBIterable.from(Arrays.asList("a", "aa", "aaa")).first()); assertEquals("aaa", JBIterable.from(Arrays.asList("a", "aa", "aaa")).last()); assertEquals("a", JBIterable.of("a").single()); assertNull(JBIterable.of("a", "aa", "aaa").single()); }