mocks: handle classes with constructors