### Question:
Durations { public static Iterable<Duration> durationIterator(Duration upto) { return filter(durations, atMost(upto)); } private  Durations(); static Iterable<Duration> getDefaultDurations(); static Iterable<Duration> durationIterator(Duration upto);  }### Answer:
@Test public void test15m() { Duration upto = DefaultDuration.of(15, TimeUnit.MINUTES); assertEquals( Lists.newArrayList(DefaultDuration.of(12, TimeUnit.MINUTES)), Lists.newArrayList(Durations.durationIterator(upto))); }
@Test public void test30m() { Duration upto = DefaultDuration.of(30, TimeUnit.MINUTES); assertEquals( Lists.newArrayList(DefaultDuration.of(12, TimeUnit.MINUTES)), Lists.newArrayList(Durations.durationIterator(upto))); }
@Test public void test60m() { Duration upto = DefaultDuration.of(60, TimeUnit.MINUTES); assertEquals(Lists.newArrayList( DefaultDuration.of(12, TimeUnit.MINUTES), DefaultDuration.of(1, TimeUnit.HOURS)), Lists.newArrayList(Durations.durationIterator(upto))); }
@Test public void test90m() { Duration upto = DefaultDuration.of(60, TimeUnit.MINUTES); assertEquals(Lists.newArrayList( DefaultDuration.of(12, TimeUnit.MINUTES), DefaultDuration.of(1, TimeUnit.HOURS)), Lists.newArrayList(Durations.durationIterator(upto))); }