separated out setTestPattern call