Added a small unit test for isCompatible()

(also fix a compile error)