Add patterns and tests.