Cleaner detection test, move to more general case