Add missing require for use as API
test: add cleanup before calling the method for a test