//---------------------------------------------------------------------------------------------------------
DocumentImpl document = new DocumentImpl();
document.setPath("/document1");
document.setName("document name 1");
document.setContentType("plain/text");
DocumentStream documentStream = new DocumentStream();
documentStream.setEncoding("utf-8");
documentStream.setContent("Test Content".getBytes());
document.setDocumentStream(documentStream);
ocm.insert(document);
document = new DocumentImpl();
document.setPath("/document2");
document.setName("document name 2");
document.setContentType("plain/text");
documentStream = new DocumentStream();
documentStream.setEncoding("utf-8");
documentStream.setContent("Test Content".getBytes());
document.setDocumentStream(documentStream);
ocm.insert(document);
document = new DocumentImpl();
document.setPath("/document3");
document.setName("document 3");
document.setContentType("plain/text");
documentStream = new DocumentStream();
documentStream.setEncoding("utf-8");
documentStream.setContent("Test Content 3".getBytes());
document.setDocumentStream(documentStream);
ocm.insert(document);
FolderImpl folder = new FolderImpl();
folder.setPath("/folder1");
folder.setName("folder1");
ocm.insert(folder);
document = new DocumentImpl();
document.setName("document4");
document.setContentType("plain/text");
documentStream = new DocumentStream();
documentStream.setEncoding("utf-8");
documentStream.setContent("Test Content 4".getBytes());
document.setDocumentStream(documentStream);
FolderImpl subFolder = new FolderImpl();
subFolder.setName("subfolder");