Allow mocking classes with a final constructor