@Test
public void testFromXml() throws Exception {

  assertNotNull(mediaSegments);
  String xml = mediaSegments.toXml();
  MediaSegments mediaSegments = MediaSegments.fromXml(xml);
  assertNotNull(mediaSegments);
  assertNotNull(mediaSegments.getMediaSegments());
  assertTrue(mediaSegments.getMediaSegments().size() == 3);
}