@Test
void spoolBulkData() throws IOException {

    Path spoolPath = Files.createTempFile(null,".blk");
    DicomObject data = parseSpoolBulkData(spoolPath);
    DicomElement seg = data.get(Tag.WaveformSequence).orElseGet(Assertions::fail);
    DicomObject item = seg.getItem(0);
    assertNotNull(item);
    DicomElement waveformData = item.get(Tag.WaveformData).orElseGet(Assertions::fail);
    assertTrue(waveformData.bulkDataURI()
            .endsWith(".blk#length=256"));
    DicomElement overlayData = data.get(Tag.OverlayData).orElseGet(Assertions::fail);
    assertTrue(overlayData.bulkDataURI()
            .endsWith(".blk#offset=256&length=256"));
    DicomElement pixelData = data.get(Tag.PixelData).orElseGet(Assertions::fail);
    assertTrue(pixelData.bulkDataURI()
            .endsWith(".blk#offset=512"));
    assertTrue(data.get(Tag.DataSetTrailingPadding).isPresent());
    assertEquals(792, Files.size(spoolPath));
    Files.deleteIfExists(spoolPath);
}