UCFPackage extends ODFJaxb implements Cloneable { protected RootFiles getRootFiles(Container container) { for (Object o : container.getRootFilesOrAny()) { if (o instanceof JAXBElement) { @SuppressWarnings("rawtypes") JAXBElement jaxbElement = (JAXBElement) o; o = jaxbElement.getValue(); } if (o instanceof RootFiles) return (RootFiles) o; } RootFiles rootFiles = containerFactory.createContainerRootFiles(); container.getRootFilesOrAny().add( containerFactory.createContainerRootFiles(rootFiles)); return rootFiles; } UCFPackage();  UCFPackage(File containerFile);  UCFPackage(InputStream inputStream); String getPackageMediaType(); void setPackageMediaType(String mediaType); void save(File packageFile); void addResource(String stringValue, String path, String mediaType); void addResource(byte[] bytesValue, String path, String mediaType); void addResource(Document document, String path, String mediaType); void addResource(InputStream inputStream, String path,
			String mediaType); void addResource(URI uri, String path, String mediaType); String getResourceAsString(String path); byte[] getResourceAsBytes(String path); InputStream getResourceAsInputStream(String path); Map<String, ResourceEntry> listResources(); Map<String, ResourceEntry> listResources(String folderPath); void removeResource(String path); Map<String, ResourceEntry> listAllResources(); void setRootFile(String path); @SuppressWarnings("rawtypes") void setRootFile(String path, String version); @SuppressWarnings("rawtypes") List<ResourceEntry> getRootFiles(); ResourceEntry getResourceEntry(String path); @SuppressWarnings("rawtypes") void unsetRootFile(String path); void save(OutputStream output); OutputStream addResourceUsingOutputStream(String path,
			String mediaType); @Override UCFPackage clone(); String getRootFileVersion(String rootFile); static final String MIME_BINARY; static final String MIME_TEXT_PLAIN; static final String MIME_TEXT_XML; static final String MIME_RDF; static final String MIME_EPUB; static final String MIME_WORKFLOW_BUNDLE; static final String MIME_DATA_BUNDLE; static final String MIME_WORKFLOW_RUN_BUNDLE; static final String MIME_SERVICE_BUNDLE; }
@Test public void getRootfiles() throws Exception { UCFPackage container = new UCFPackage(); container.setPackageMediaType(UCFPackage.MIME_WORKFLOW_BUNDLE); container.addResource("Hello there", "helloworld.txt", "text/plain"); assertTrue("Root files not empty", container.getRootFiles().isEmpty()); assertNotSame("Should return copy of rootfiles", container.getRootFiles(), container.getRootFiles()); }