Is it possible to test a lithium ion battery for safety? How?
There is no non-destructive black-box test you can do on a battery to see whether it has any dangerous failure modes. You can test it for voltage, for capacity, for internal impedance, for in/out charge or energy efficiency, but you cannot test it for what it takes to blow it up without blowing it up.

Amongst some hobbyists whose forums I follow, the advice for getting the most performance out of power switching devices is to turn up the power until it blows up, then back off a bit! The same would go for batteries. Though you would need a supply of batteries to a) get any meaningful statistical results and b) still have a working one left to actually use.