@Test
public void testFromXml() throws Exception {

  SmilResponse smilResponse = smilService.fromXml(TEST_SMIL);
  assertNotNull(smilResponse.getSmil());
  Smil smil = smilResponse.getSmil();
  // test head
  assertSame(2, smil.getHead().getParamGroups().size());
  // test body
  assertSame(2, smil.getBody().getMediaElements().size());
  assertTrue(smil.getBody().getMediaElements().get(0) instanceof SmilMediaParallelImpl);
  assertTrue(smil.getBody().getMediaElements().get(1) instanceof SmilMediaParallelImpl);
  SmilMediaContainer par = (SmilMediaContainer) smil.getBody().getMediaElements().get(0);
  assertSame(2, par.getElements().size());
  assertTrue(par.getElements().get(0) instanceof SmilMediaVideoImpl);
  assertTrue(par.getElements().get(1) instanceof SmilMediaAudioImpl);
}