### Question:
BreakpointInfo { public long getTotalOffset() { long offset = 0; final Object[] blocks = blockInfoList.toArray(); if (blocks != null) { for (Object block : blocks) { if (block instanceof BlockInfo) { offset += ((BlockInfo) block).getCurrentOffset(); } } } return offset; } BreakpointInfo(int id, @NonNull String url, @NonNull File parentFile,
                          @Nullable String filename);   BreakpointInfo(int id, @NonNull String url, @NonNull File parentFile,
                   @Nullable String filename, boolean taskOnlyProvidedParentPath); int getId(); void setChunked(boolean chunked); void addBlock(BlockInfo blockInfo); boolean isChunked(); boolean isLastBlock(int blockIndex); boolean isSingleBlock(); BlockInfo getBlock(int blockIndex); void resetInfo(); void resetBlockInfos(); int getBlockCount(); void setEtag(String etag); long getTotalOffset(); long getTotalLength(); @Nullable String getEtag(); String getUrl(); @Nullable String getFilename(); DownloadStrategy.FilenameHolder getFilenameHolder(); @Nullable File getFile(); BreakpointInfo copy(); BreakpointInfo copyWithReplaceId(int replaceId); void reuseBlocks(BreakpointInfo info); BreakpointInfo copyWithReplaceIdAndUrl(int replaceId, String newUrl); boolean isSameFrom(DownloadTask task); @Override String toString();  }### Answer:
@Test public void getTotalOffset() { BreakpointInfo info = new BreakpointInfo(0, "", new File(""), null); info.addBlock(new BlockInfo(0, 10, 10)); info.addBlock(new BlockInfo(10, 18, 18)); info.addBlock(new BlockInfo(28, 66, 66)); assertThat(info.getTotalOffset()).isEqualTo(94); }