save mocks on class and fix initializer