Added isCompatible method to interfaces

There is a great amount of rationale in the test case added in this commit.