http://seattletimes.com/html/businesstechnology/2020717470_787flighttestxml.html
Wow! Looks like one of the tests involved creating a propane gas explosion inside the containment vessel and completely containing it!
As for testing, in most cases the tests are designed to test for anticipated failure modes. It is hard to design tests for unknown failure modes. Often such is discovered after prolonged operation. The poster child example of that was the Comet 1. It was not like anyone was maliciously avoiding testing it enough. It is just the the state of the art of understanding metal fatigue was not developed enough to anticipate that mode of failure to try testing for it. As a matter of fact initially those failures were reived with utter bafflement. Finally a series of ingenious tests in water tank running a fuselage through a zillioncycles quickly finally establsihed what the porblem was.
In this case what is known is the total of amount of energy that just be contained to contain a failure, and fortunately the amount of energy is small enough to be able to design a brute force technique to contain it, while taking additional design steps to reduce the chance of requiring such containment.
If many of you ever learn about some of the software fixes that are applied to keep semi-critical systems going while the real fix is worked on, you'd probably all have a collective apoplectic fit. But such is the world of engineering. It is as much about failure prevention as it is about mitigation and containbment should a failure occur.