Help in need of advice

I live in missouri, and currently 15 weeks pregnant by my boyfriend. Well I'm also in the middle of a divorce. Which in the state of MO you cannot get a divorce until a paternity test is done. Has anyone ever gotten a paternity test done before the baby is born? I've been doing research where you can get one by getting a blood sample from the mother, and mouth swab from the father? Any advice??