Add arbitrary cycles pattern test case