Automatic Testing with Formal Methods