How soon to test

How soon after unprotected sex can you test? Don't really have any symptoms, just a lot of CM and not feeling myself. AF isn't due for 9 days and I don't want to wAit that long. Thank you!