Add pattern manager tests