@Test
public void readFromNode() throws Exception {

  final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
  dbf.setNamespaceAware(true);
  final Document doc = dbf.newDocumentBuilder().parse(
      IoSupport.classPathResourceAsFile("/matterhorn-inlined-list-records-response.xml").get());
  final NamespaceContext ctx = XmlNamespaceContext.mk(
      XmlNamespaceBinding.mk("inlined", "http://www.opencastproject.org/oai/matterhorn-inlined"),
      XmlNamespaceBinding.mk("mp", "http://mediapackage.opencastproject.org"),
      XmlNamespaceBinding.mk("dc", DublinCores.OC_DC_CATALOG_NS_URI));
  // extract media package
  final Node mpNode = Xpath.mk(doc, ctx).node("//inlined:inlined/mp:mediapackage").get();
  final MediaPackage mp = MediaPackageBuilderFactory.newInstance().newMediaPackageBuilder().loadFromXml(mpNode);
  assertNotNull(mp);
  assertEquals("10.0000/5820", mp.getIdentifier().toString());
  // extract episode DublinCore
  final Node dcNode = Xpath.mk(doc, ctx).node("//inlined:inlined/inlined:episode-dc/dc:dublincore").get();
  final DublinCoreCatalog dc = DublinCoreXmlFormat.read(dcNode);
  assertNotNull(dc);
  assertEquals("10.0000/5820", DublinCores.mkOpencastEpisode(dc).getDcIdentifier().get());
}