### Question:
JcrWorkspace implements Workspace { public void importXML( String parentAbsPath, InputStream in, int uuidBehavior ) throws IOException, PathNotFoundException, ItemExistsException, ConstraintViolationException, InvalidSerializedDataException, LockException, AccessDeniedException, RepositoryException { CheckArg.isNotNull(parentAbsPath, "parentAbsPath"); CheckArg.isNotNull(in, "in"); session.checkLive(); try { XMLReader parser = XMLReaderFactory.createXMLReader(); parser.setContentHandler(getImportContentHandler(parentAbsPath, uuidBehavior)); parser.parse(new InputSource(in)); } catch (EnclosingSAXException ese) { Exception cause = ese.getException(); if (cause instanceof ItemExistsException) { throw (ItemExistsException)cause; } else if (cause instanceof ConstraintViolationException) { throw (ConstraintViolationException)cause; } throw new RepositoryException(cause); } catch (SAXParseException se) { throw new InvalidSerializedDataException(se); } catch (SAXException se) { throw new RepositoryException(se); } } JcrWorkspace( JcrRepository repository,
                  String workspaceName,
                  ExecutionContext context,
                  Map<String, Object> sessionAttributes ); final String getName(); final Session getSession(); final javax.jcr.NamespaceRegistry getNamespaceRegistry(); String[] getAccessibleWorkspaceNames(); final NodeTypeManager getNodeTypeManager(); final ObservationManager getObservationManager(); LockManager getLockManager(); final QueryManager getQueryManager(); void clone( String srcWorkspace,
                       String srcAbsPath,
                       String destAbsPath,
                       boolean removeExisting ); void copy( String srcAbsPath,
                      String destAbsPath ); void copy( String srcWorkspace,
                      String srcAbsPath,
                      String destAbsPath ); ContentHandler getImportContentHandler( String parentAbsPath,
                                                   int uuidBehavior ); void importXML( String parentAbsPath,
                           InputStream in,
                           int uuidBehavior ); void move( String srcAbsPath,
                      String destAbsPath ); void restore( Version[] versions,
                         boolean removeExisting ); @Override void createWorkspace( String name,
                                 String srcWorkspace ); @Override void createWorkspace( String name ); @Override void deleteWorkspace( String name ); @Override VersionManager getVersionManager();  }### Answer:
@Test public void shouldAllowImportXml() throws Exception { String inputData = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<sv:node xmlns:jcr=\"http: + "xmlns:sv=\"http: + "<sv:property sv:name=\"jcr:primaryType\" sv:type=\"Name\">" + "<sv:value>nt:unstructured</sv:value></sv:property></sv:node>"; workspace.importXML("/", new ByteArrayInputStream(inputData.getBytes()), 0); }