You can have a blood test to exclude that you have the infection, but also if you are immune. However you would only be immune if you have had the vaccination. If you have never been immunised, there is no point in testing for that and once the infection has been excluded you can have the immunisation, which requires 3 different injections over a period of 6 months. If you ahve not put yourself at risk and you have never been immunised, you do not need any tests before having the vaccination.
Best wishes,
Jose