The best way to use a third-party library in your code is to introduce an abstraction class/layer between your code and the third-party library. This has the advantage that you can make clear which functionality you use from the third-party library (you seldom use everything from a third-party library), and also that the classes and types of the third-party library do not leak into your code. That way, you are still in control with your own code. You can also write (unit) tests against the third-party library which calls the methods you need and evaluates the responses or actions. That way, you can easily check if the functionality of the third-party library has changed during an update or upgrade.