@Test
void withBulkDataURI() throws IOException {

    String baseURL = DicomInputStreamTest.resource("waveform_overlay_pixeldata.dcm").toString();
    DicomObject data = DicomObject.newDicomObject();
    DicomElement seq = data.newDicomSequence(Tag.WaveformSequence);
    DicomObject item = DicomObject.newDicomObject();
    seq.addItem(item);
    item.setBulkData(Tag.WaveformData, VR.OW, baseURL + "#offset=32&length=256", null);
    data.setBulkData(Tag.OverlayData, VR.OW, baseURL + "#offset=300&length=256", null);
    data.setBulkData(Tag.PixelData, VR.OB, baseURL + "#offset=568", null);
    data.setNull(Tag.DataSetTrailingPadding, VR.OB);
    assertArrayEquals(resourceAsBytes("waveform_overlay_pixeldata.dcm"),
            writeDataset(DicomEncoding.EVR_LE, false,
                DicomOutputStream.LengthEncoding.EXPLICIT,
                DicomOutputStream.LengthEncoding.EXPLICIT,
                data));
}