Test against interface instead of concrete class