Best way to bypass is to disconnect the hose at the filter and connect in there, that way your filtering the new fuel, you don't want to bypass filters.
As far as removing old fuel, change filters and then bleed system at the injectors by loosening the "B" nuts and letting fuel escape as the
engine is turned over, of course after you have connected to a fresh supply of fuel, all it takes is a 5 gl can
I know of no test, but old fuel just doesn't smell right. meaning it might have a
varnish type of smell, not smell like
Diesel.
Myself if I thought the fuel was "bad" enough so that the engine wouldn't run right, I'd get rid of it, I wouldn't try to save it.
On Zee's point, I've run 20 yr old fuel in a Backhoe, ran great.