### Question:
ProgressHandler { public void postFraction(final double fraction) { currentStep.postFraction(fraction); } ProgressHandler(AbstractTask<?> t,
            double begin,
            double end,
            int steps);  ProgressHandler(AbstractTask<?> t, int steps);  ProgressHandler(final AbstractTask<?> task,
        final double begin, 
        final double end);  ProgressHandler(AbstractTask<?> t); void setMinProgressIncrement(final double minInc); void setMinTimeIncrement(final long ms); void postMessage(final String msg); void postFraction(final double fraction); void postStep(); void postSteps(final int steps); void postEnd(); void postIndeterminate(); void subsection(final double fraction); void subsection(final double fraction, final int steps); void subsection(final int steps); void subsection(); void postBegin(); double getCurrentProgress(); static final double DEFAULT_START_VALUE; static final double DEFAULT_END_VALUE; static final double DEFAULT_MIN_PROGRESS_INC; static final long DEFAULT_MIN_TIME_INC; }### Answer:
@Test public void testPostFraction() throws InterruptedException { TestTask testTask = new TestTask(0.0, 1.0, 10); testTask.setPostFractionalProgress(true); final List<Double> progressReceived = new ArrayList<>(); testTask.addTaskListener(new TaskAdapter() { @Override public void taskProgress(TaskEvent evt) { progressReceived.add(evt.getProgress()); } }); Thread t = new Thread(testTask); t.start(); t.join(); assertTrue(progressReceived.size() >= 10); for (int i=1; i<progressReceived.size() - 1; i++) { assertEquals(0.1, progressReceived.get(i) - progressReceived.get(i-1), 1.0e-10); } }