RemoveDocumentSetTransformer { public RemoveDocumentSet fromEbXML(EbXMLRemoveObjectsRequest ebXML) { if (ebXML == null) { return null; } RemoveDocumentSet request = new RemoveDocumentSet(); request.getReferences().addAll(ebXML.getReferences()); request.setDeletionScope(ebXML.getDeletionScope()); if (ebXML.getId() != null){ String id = ebXML.getId(); QueryType queryType = id == null ? QueryType.SQL : QueryType.valueOfId(id); if (queryType == null) { return null; } Query query = createQuery(queryType); query.accept(new FromEbXMLVisitor(ebXML)); request.setQuery(query); } return request; } RemoveDocumentSetTransformer(); EbXMLRemoveObjectsRequest toEbXML(RemoveDocumentSet request); RemoveDocumentSet fromEbXML(EbXMLRemoveObjectsRequest ebXML);  }
@Test public void testFromEbXML() { EbXMLRemoveObjectsRequest ebXML = transformer.toEbXML(request); RemoveDocumentSet result = transformer.fromEbXML(ebXML); assertEquals(request.toString(), result.toString()); }