@Test
void writeFileMetaInformation() throws IOException {

    DicomObject fmi = DicomObject.newDicomObject();
    fmi.setString(Tag.TransferSyntaxUID, VR.UI, UID.DeflatedExplicitVRLittleEndian);
    ByteArrayOutputStream bout = new ByteArrayOutputStream();
    try (DicomOutputStream dos = new DicomOutputStream(bout)) {
        dos.writeFileMetaInformation(fmi)
                .withEncoding(fmi)
                .writeDataSet(DicomObject.newDicomObject());
    }
    assertArrayEquals(resourceAsBytes("preamble_fmi_defl.dcm"), bout.toByteArray());
}