@Test public void testToXml() throws Exception { assertNotNull(mediaSegments); String xml = mediaSegments.toXml(); assertNotNull(xml); assertFalse(xml.isEmpty()); }
public String toXml() throws JAXBException { StringWriter sw = new StringWriter(); JAXBContext jctx = JAXBContext.newInstance(MediaSegments.class); Marshaller mediaSegmentsMarshaller = jctx.createMarshaller(); mediaSegmentsMarshaller.marshal(this, sw); return sw.toString(); }
MediaSegments { public String toXml() throws JAXBException { StringWriter sw = new StringWriter(); JAXBContext jctx = JAXBContext.newInstance(MediaSegments.class); Marshaller mediaSegmentsMarshaller = jctx.createMarshaller(); mediaSegmentsMarshaller.marshal(this, sw); return sw.toString(); } }
MediaSegments { public String toXml() throws JAXBException { StringWriter sw = new StringWriter(); JAXBContext jctx = JAXBContext.newInstance(MediaSegments.class); Marshaller mediaSegmentsMarshaller = jctx.createMarshaller(); mediaSegmentsMarshaller.marshal(this, sw); return sw.toString(); } MediaSegments();  MediaSegments(String trackId, String filePath, List<MediaSegment> mediaSegments); }
MediaSegments { public String toXml() throws JAXBException { StringWriter sw = new StringWriter(); JAXBContext jctx = JAXBContext.newInstance(MediaSegments.class); Marshaller mediaSegmentsMarshaller = jctx.createMarshaller(); mediaSegmentsMarshaller.marshal(this, sw); return sw.toString(); } MediaSegments();  MediaSegments(String trackId, String filePath, List<MediaSegment> mediaSegments); List<MediaSegment> getMediaSegments(); String getTrackId(); String getFilePath(); String toXml(); static MediaSegments fromXml(String mediaSegmentsXml); }
MediaSegments { public String toXml() throws JAXBException { StringWriter sw = new StringWriter(); JAXBContext jctx = JAXBContext.newInstance(MediaSegments.class); Marshaller mediaSegmentsMarshaller = jctx.createMarshaller(); mediaSegmentsMarshaller.marshal(this, sw); return sw.toString(); } MediaSegments();  MediaSegments(String trackId, String filePath, List<MediaSegment> mediaSegments); List<MediaSegment> getMediaSegments(); String getTrackId(); String getFilePath(); String toXml(); static MediaSegments fromXml(String mediaSegmentsXml);  }