How unit testing could have saved lives