* Tests complex overriding patterns involving package private methods.
* <p>
* Test for issue 8654.
*/
public void testOverride() {
Caller aCaller = new Caller();
assertEquals("SomeParentParent", aCaller.callPackagePrivatem(new SomeParentParent()));
assertEquals("SomeParent", aCaller.callPackagePrivatem(new SomeParent()));
assertEquals("SomeParent", aCaller.callPackagePrivatem(
new SomeSubClassInAnotherPackage()));
assertEquals("SomeSubClassInAnotherPackage",
SomeSubClassInAnotherPackage.pleaseCallm(new SomeSubClassInAnotherPackage()));
assertEquals("SomeSubSubClassInAnotherPackage",
SomeSubClassInAnotherPackage.pleaseCallm(new SomeSubSubClassInAnotherPackage()));
assertEquals("ClassExposingM",
aCaller.callPackagePrivatem(new ClassExposingM()));
SomeInterface i = new ClassExposingM();
assertEquals("ClassExposingM", i.m());
assertEquals("live at ClassExposingM", new ClassExposingM().f());