### Question:
XmlLinkConsumer { public String readLink(final XMLStreamReader reader, final EdmEntitySet entitySet) throws EntityProviderException { try { reader.next(); return readLink(reader); } catch (final XMLStreamException e) { throw new EntityProviderException(EntityProviderException.EXCEPTION_OCCURRED.addContent(e.getClass() .getSimpleName()), e); } }  String readLink(final XMLStreamReader reader, final EdmEntitySet entitySet); List<String> readLinks(final XMLStreamReader reader, final EdmEntitySet entitySet);  }### Answer:
@Test public void readLink() throws Exception { XMLStreamReader reader = createReaderForTest(SINGLE_LINK, true); final String link = new XmlLinkConsumer().readLink(reader, null); assertEquals(SERVICE_ROOT + "Employees('6')", link); }
@Test(expected = EntityProviderException.class) public void wrongNamespace() throws Exception { new XmlLinkConsumer().readLink(createReaderForTest(SINGLE_LINK.replace(Edm.NAMESPACE_D_2007_08, Edm.NAMESPACE_M_2007_08), true), null); }
@Test(expected = EntityProviderException.class) public void xmlContent() throws Exception { final String xml = "<uri xmlns=\"" + Edm.NAMESPACE_D_2007_08 + "\"><uri>X</uri></uri>"; new XmlLinkConsumer().readLink(createReaderForTest(xml, true), null); }