javax.validation.ConstraintDeclarationException: HV000131. Cascaded validation in hierarchy objects

I have the next hierarchy:

public class A extends B {
   public A(String languageCode, C token) {
      super(languageCode, token);

The B class has a property call language code that should be validated with @NotEmpty only if a service has the @Validated({RequiringLanguageCode.class})

 public class B extends D {

    private String languageCode;

    public B(String languageCode, C token) {
        this.languageCode = languageCode;

    @NotEmpty(groups = {RequiringLanguageCode.class})
    public String getLanguageCode() {
        return languageCode;

Now, D is the base class that has a C property that should be validated as NotNull and also the values that are inside the C class.

public class D {

    private C token;

    public D(C token) {
        this.token = token;

    public C getToken() {
        return token;

C class contains two String that are validated as @NotEmpty:

public class C {

    private String value1;

    private String value2;

    public C(String value1,
            String value2) {
        this.value1 = value1;
        this.value2 = value2;

    public String getValue1() {
        return value1;

    public String getValue2() {
        return value2;

When trying to test this using mockito the values of C class aren’t validated if the token values (value1 and value2) are empty.

Can somebody help me? Does somebody have any idea about what is happening?

The test are as followed:

public class ATest {

    private AAssembler aAssembler;

    A request;

    C token;

    public void test() {
           .isThrownBy(() ->;

The AAssembler is annotated as @Validated({RequiringLanguageCode.class})

The reason why I launch an IllegalArgumentException instead of ConstraintViolationException is something out of scope of this problem. I catch the constraint violation an throw the IllegalArgumentException instead.

The Assembler build method has also a constraint annotated as :

public Response build(@Valid @NotNull A request) {

I would be very thankful if somebody can help me. Thanks anyway.