diff --git a/Gemfile b/Gemfile
index ff94ab082efc79ac866a8773adfafce77acb8a28..95a1752d46497ee98cb628dfdc45d3836d2f0895 100644
--- a/Gemfile
+++ b/Gemfile
@@ -2,6 +2,8 @@
 
 source 'https://rubygems.org'
 
+gem 'passwordstate', git: 'https://gitlab.liu.se/ITI/ruby-passwordstate'
+
 # Specify your gem's dependencies in foreman_passwordstate.gemspec
 gemspec
 
diff --git a/test/services/foreman_passwordstate/host_info_provider_test.rb b/test/services/foreman_passwordstate/host_info_provider_test.rb
index 5a3fbcc9399378b940677edd385fe3d32c42a0a4..15d20e3b1329765f457f57980445b4190e92a0e0 100644
--- a/test/services/foreman_passwordstate/host_info_provider_test.rb
+++ b/test/services/foreman_passwordstate/host_info_provider_test.rb
@@ -12,7 +12,7 @@ class ForemanPasswordstate::HostInfoProviderTest < ActiveSupport::TestCase
     test 'it generates reasonable passwordstate info' do
       assert host.passwordstate_facet
 
-      pwlist = FactoryBot.build(:passwordstate_password_list)
+      pwlist = ::Passwordstate::Resources::PasswordList.new(password_list_id: 5, password_list: 'Test', tree_path: '\\Passwords' 
       get_pwlist = stub_request(:get, 'https://passwordstate.localhost.localdomain/winapi/passwordlists/5')
       host.passwordstate_facet.stubs(:password_list).returns(pwlist)
       host.stubs(:host_pass) # Avoid server availability testing