If it's a one time thing, it's not that big of a deal, just hydrate hard up until 24 hours prior, then fast and drink water, overhydrate, and pee frequently but don't piss for a few hours prior to the test, and you should piss out water.

There are other methods for more extreme situations, such as drinking gelatin the day before, which essentially tricks your system into making the THC cling to whatever properties gelatin has that mimic the liver (this is all from memory so don't quote me verbatim) and thus become expelled when you dispose of the gelatin through natural processes.

Then there is niacin, but it's risky, and dangerous, and unpleasant to deal with when flushing.

There are the drinks you can get at head shops, but usually that's just the same as trying to flush with water, only more expensive.

To be safe, buy yourself some home tests, drink tons of water like I suggested originally, and test yourself hours before the test, if you come up clean in your home tests, or really diluted, go test with confidence.

Caveat: lab tests are usually more efficient than home tests and can test for more substances.

Another measure, if you have the yayper to drop on it, is fake piss/dry piss and/or a fake penis with fake piss. If you are going to test unsupervised, this is probably the most foolproof method, you just need to follow the directions to the T - keep the fake/dried out piss at body temp, etc etc.

NIACIN DOES NOTHING. I hate it when people do that, because over using niacin like that kills your liver. All niacin does is burn off fat and make your skin feel like it's on fire. THC is stored in fat so people think Niacin will help, but even if your like I am and are really scrawny/skinny/low body fat % it takes more then a few days to flush it out.