@Test
public void testAddSequence() throws Exception {

  SmilResponse smilResponse = smilService.createNewSmil();
  smilResponse = smilService.addSequence(smilResponse.getSmil());
  assertNotNull(smilResponse.getSmil().getBody().getMediaElements().get(0));
  assertEquals(smilResponse.getSmil().getBody().getMediaElements().get(0), smilResponse.getEntity());
  assertTrue(smilResponse.getSmil().getBody().getMediaElements().get(0) instanceof SmilMediaSequenceImpl);
  SmilMediaContainer par = (SmilMediaContainer) smilResponse.getEntity();
  assertTrue(par.isContainer());
  assertSame(SmilMediaContainer.ContainerType.SEQ, par.getContainerType());
  smilResponse = smilService.addSequence(smilResponse.getSmil(), smilResponse.getEntity().getId());
  assertNotNull(smilResponse.getSmil().getBody().getMediaElements().get(0));
  assertTrue(smilResponse.getSmil().getBody().getMediaElements().get(0) instanceof SmilMediaSequenceImpl);
  SmilMediaContainer parent = (SmilMediaContainer) smilResponse.getSmil().getBody().getMediaElements().get(0);
  assertNotNull(parent.getElements().get(0));
  assertTrue(parent.getElements().get(0) instanceof SmilMediaSequenceImpl);
  assertEquals(parent.getElements().get(0).getId(), smilResponse.getEntity().getId());
  // logger.info(((SmilImpl)smilResponse.getSmil()).toXML());
}