public void testInsertImage_URI() throws Exception {
LOG.info("insertImage from URI");
OdfTextDocument odt = OdfTextDocument.newTextDocument();
OdfTextParagraph para = (OdfTextParagraph) odt.getContentRoot().newTextPElement();
OdfDrawFrame frame = (OdfDrawFrame) para.newDrawFrameElement();
OdfDrawImage image = (OdfDrawImage) frame.newDrawImageElement();
String packagePath = image.newImage(ResourceUtilities.getURI("testA.jpg"));
assertEquals(image.getXlinkTypeAttribute(), "simple");
LOG.info(frame.getSvgWidthAttribute());
LOG.info(frame.getSvgHeightAttribute());
assert (frame.getSvgWidthAttribute().startsWith("19.") && frame.getSvgWidthAttribute().endsWith("cm"));
assert (frame.getSvgHeightAttribute().startsWith("6.") && frame.getSvgHeightAttribute().endsWith("cm"));
assertEquals(odt.getPackage().getFileEntry(packagePath).getMediaTypeString(), "image/jpeg");