What happens when a quarry mines a chest?

I have a quarry mining above an abandoned mine. There's a good chance eventually the quarry will mine a chest block. Will the quarry suck up the chest with its contents, or just the chest?


The quarry breaks open the chest and then picks up the items on the ground as it passes over them. It's the same way for beehives, if you have those in your world.