Add test for class type check.

The new test fails without the change to `KWMessagePattern`.