Added pattern unitary tests.