### Question:
MultiPointOutputStream { void runSyncDelayException() { try { runSync(); } catch (IOException e) { syncException = e; Util.w(TAG, "Sync to breakpoint-store for task[" + task.getId() + "] " + "failed with cause: " + e); } } MultiPointOutputStream(@NonNull final DownloadTask task,
                           @NonNull BreakpointInfo info,
                           @NonNull DownloadStore store,
                           @Nullable Runnable syncRunnable);  MultiPointOutputStream(@NonNull DownloadTask task,
                                  @NonNull BreakpointInfo info,
                                  @NonNull DownloadStore store); synchronized void write(int blockIndex, byte[] bytes, int length); void cancelAsync(); synchronized void cancel(); void done(int blockIndex); void inspectComplete(int blockIndex); void setRequireStreamBlocks(List<Integer> requireStreamBlocks); void catchBlockConnectException(int blockIndex);  }### Answer:
@Test public void runSyncDelayException() throws IOException { final IOException exception = mock(IOException.class); doThrow(exception).when(multiPointOutputStream).runSync(); multiPointOutputStream.runSyncDelayException(); assertThat(multiPointOutputStream.syncException).isEqualTo(exception); }