EDIT: I've worked at some shops that were "cultish" and would look at testifying without a subpoena as not being part of the team. Fucked up, but organizations are often so. You need to do the right thing in the smartest way possible.
You can choose not to be a part of these organizations.
Mortgage, kids... Sometimes you need a paycheck.
Mortgages are not inherently bad. It's what you take the mortgage for is the bad decision.
Example:
Good:
Having a mortgage for a legal duplex (2 dwellings) and renting the other half out, while you live in one.
Bad:
Getting a house that's one big sink hole of cash and having more bedrooms/lawn/what have you.
You can be employed to build someone else's dreams. However there are other options available to you that don't involve being a rat.
If you do decide to testify, I would strongly recommend finding someone completely unrelated to the case who can coach you on how to be a witness. Not what to say, but how to say it. My only experience testifying was in a small criminal trial, but the advice I was given was to keep my answers short, factual and free of emotion.
Some companies will immediately discount you if you testify against a former employer. For those that look closely at the case, though, you do not want to come across as someone testifying because they bear a grudge. A calm, passive, "just the facts" attitude will be the best for your career.
* You may not be called to testify because you've made yourself a hassle, which solves your career problem but implicates you morally.
* Converting your testimony from freely-provided to compelled might have logistical implications. I've been compelled to testify before, and it was a nightmare for me. I'd have been happier if I could have told the trial participants "I'm busy this week, fuck off".
Otherwise, explain the situation to the prosecutor and detective and ask to be subpoenaed. They'd likely be happy to comply.
Whereas everyone else at the company were good team-players and kept their mouth shut and head down, so the plaintiff wasn't sure if s/he could count on their testimony or if they even knew anything.
Again, just explaining how someone might fear the logic would go. Not saying anyone does or should actually think like this.