In my JUnit tests, I need to override some public method behavior from class A (module M1). For that, I am doing something similar to that (in JUnit module M2):
package com.acme;
public class B extends A{
@Override
public String methodToOverride(){
return "TestDataHere";
}
}
How Java 9 JPMS recommended to override some package in 3rd party module or your module? How to properly configure to JPMS to use modules M1 and M2 with the same package names?