### Question:
MarcRecord { final String getMarcXml() { ByteArrayOutputStream baos = new ByteArrayOutputStream(); MarcWriter writer = new MarcXmlWriter(baos); writer.write(getRecord()); writer.close(); try { return baos.toString(StandardCharsets.UTF_8.name()); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } } MarcRecord(); static MarcField newDataField(String field); final void addMarcField(MarcField marcField); final void addMarcField(String field, char subfield, String value); final void addControlField(String tag, String value); @Override final boolean equals(Object o); @Override final int hashCode();  }### Answer:
@Test public void serialize_a_record_as_marcxml() { assertNotNull(marcRecord.getMarcXml()); }