/**
* two shapes, second is a group
*/
public void testShapes() throws Exception {
HWPFDocument doc = new HWPFDocument(new FileInputStream(dirname + "/WithArtShapes.doc"));
List shapes = doc.getShapesTable().getAllShapes();
List vshapes = doc.getShapesTable().getVisibleShapes();
assertEquals(2, shapes.size());
assertEquals(2, vshapes.size());
Shape s1 = (Shape)shapes.get(0);
Shape s2 = (Shape)shapes.get(1);
assertEquals(3616, s1.getWidth());
assertEquals(1738, s1.getHeight());
assertEquals(true, s1.isWithinDocument());
assertEquals(4817, s2.getWidth());
assertEquals(2164, s2.getHeight());
assertEquals(true, s2.isWithinDocument());
// Re-serialisze, check still there
ByteArrayOutputStream baos = new ByteArrayOutputStream();
doc.write(baos);
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
doc = new HWPFDocument(bais);
shapes = doc.getShapesTable().getAllShapes();
vshapes = doc.getShapesTable().getVisibleShapes();
assertEquals(2, shapes.size());
assertEquals(2, vshapes.size());
s1 = (Shape)shapes.get(0);