### Question:
ProgressState { public boolean isComplete() { return currentPercent.get() == MAX_PERCENT; } ProgressState(final ProgressPoint... sequence);  ProgressState(final List<ProgressPoint> sequence); int tick(final int size); boolean isComplete();  }### Answer:
@Test public void testEmpty() { target = new ProgressState(); assertFalse(target.isComplete()); validateIncrement(100, 0, 0); validateNoIncrement(100, 0); assertTrue(target.isComplete()); }
@Test public void testPointAtStart() { target = new ProgressState(new ProgressPoint(0, 1)); assertFalse(target.isComplete()); validateNoIncrement(0, 0); validateIncrement(100, 0, 1); validateNoIncrement(100, 1); assertTrue(target.isComplete()); }
@Test public void testPointAtStartEnd() { target = new ProgressState(new ProgressPoint(100, 1)); assertFalse(target.isComplete()); validateIncrement(99, 0, 0); validateNoIncrement(99, 0); validateIncrement(1, 99, 1); validateNoIncrement(100, 1); assertTrue(target.isComplete()); }
@Test public void testThreePoints() { target = new ProgressState( new ProgressPoint(10, 1), new ProgressPoint(20, 2), new ProgressPoint(30, 3)); assertFalse(target.isComplete()); validateIncrement(9, 0, 0); validateNoIncrement(9, 0); validateIncrement(10, 9, 1); validateNoIncrement(19, 1); validateIncrement(10, 19, 2); validateNoIncrement(29, 2); validateIncrement(71, 29, 3); validateNoIncrement(100, 0); assertTrue(target.isComplete()); }