@Test public void testWithMarkupsNullAdditionalMarkups() { Sequence withMarkups = sequence.withMarkups(null); assertNotNull(withMarkups.getMarkups()); assertEquals(1, withMarkups.getMarkups().size()); assertEquals(24, withMarkups.getMarkups().get(0).getStart()); }
@Test public void testWithMarkupsEmptyAdditionalMarkups() { List<Markup> empty = Collections.emptyList(); Sequence withMarkups = sequence.withMarkups(empty); assertNotNull(withMarkups.getMarkups()); assertEquals(1, withMarkups.getMarkups().size()); assertEquals(24, withMarkups.getMarkups().get(0).getStart()); }
@Test public void testWithMarkups() { Markup markup = new Markup(); markup.setStart(13); Sequence withMarkups = sequence.withMarkups(ImmutableList.of(markup)); assertNotNull(withMarkups.getMarkups()); assertEquals(2, withMarkups.getMarkups().size()); for (Markup m : withMarkups.getMarkups()) { assertTrue(m.getStart() == 13 || m.getStart() == 24); } }
@Test public void testWithMarkupsNullMarkups() { sequence.setMarkups(null); Sequence withMarkups = sequence.withMarkups(null); assertNull(withMarkups.getMarkups()); }