### Question:
Repository implements Comparable<Repository> { public Element getElement(final Document document, final String tagName) { final Element repositoryElement = new XmlElementBuilder(tagName, document) .addChild(new XmlElementBuilder("id", document).setText(id).build()) .addChild(new XmlElementBuilder("url", document).setText(url).build()).build(); if (name != null) { repositoryElement.appendChild(new XmlElementBuilder("name", document).setText(name).build()); } if (enableSnapshots) { repositoryElement.appendChild(new XmlElementBuilder("snapshots", document).addChild( new XmlElementBuilder("enabled", document).setText("true").build()).build()); } return repositoryElement; } Repository(final Element element);  Repository(final String id, final String name, final String url);  Repository(final String id, final String name, final String url,
      final boolean enableSnapshots); int compareTo(final Repository o); @Override boolean equals(final Object obj); Element getElement(final Document document, final String tagName); String getId(); String getName(); String getUrl(); @Override int hashCode(); boolean isEnableSnapshots(); @Override String toString();  }### Answer:
@Test public void testGetElement() { final Repository repository = new Repository(ID, NAME, URL, ENABLE_SNAPSHOTS); final Element element = repository.getElement(DOCUMENT_BUILDER.newDocument(), PATH); assertXmlEquals(EXPECTED_XML, element); }