add test and pattern