@Test public void collectOnFromToByInterval() { Interval interval = Interval.oneToBy(5, 2); LazyIterable<String> result = interval.collect(String::valueOf); Verify.assertIterableSize(3, result); Verify.assertContainsAll(result, "1", "5"); Verify.assertNotContains("2", result); }
@Test(expected = IllegalArgumentException.class) public void oneToBy_throws_step_size_zero() { Interval.oneToBy(1, 0); }