In this test, instead of declaring a `RequiredValidator` class, you could declare a spy. Something like this:
```
var requiredValidator = jasmine.createSpy('requiredValidator').andReturn('fake_validator_function');
ko.validation.registerValidator('required', requiredValidator);
observable = ko.observable().extend({ required: ['argument_to_initialise_the_validator'] });

expect(requiredValidator).toHaveBeenCalledWith('argument_to_initialise_the_validator');
expect(observable.__validators__).toContain('fake_validator_function');
```