wb = XSSFTestDataSamples.writeOutAndReadBack(wb);
sheet = wb.getSheetAt(0);
// Check
dr1 = sheet.createDrawingPatriarch();
CTDrawing ctDrawing = dr1.getCTDrawing();
// Connector, shapes and text boxes are all two cell anchors
assertEquals(0, ctDrawing.sizeOfAbsoluteAnchorArray());
assertEquals(0, ctDrawing.sizeOfOneCellAnchorArray());
assertEquals(4, ctDrawing.sizeOfTwoCellAnchorArray());
shapes = dr1.getShapes();
assertEquals(4, shapes.size());
assertTrue(shapes.get(0) instanceof XSSFConnector);
assertTrue(shapes.get(1) instanceof XSSFShapeGroup);
assertTrue(shapes.get(2) instanceof XSSFSimpleShape);
assertTrue(shapes.get(3) instanceof XSSFSimpleShape); //
// Ensure it got the right namespaces
String xml = ctDrawing.toString();
assertTrue(xml.contains("xmlns:xdr=\"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing\""));
assertTrue(xml.contains("xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\""));
assertNotNull(XSSFTestDataSamples.writeOutAndReadBack(wb));
}