AuthenticationDataValidator { void validateAuthenticatorData(AuthenticatorData<AuthenticationExtensionAuthenticatorOutput> authenticatorData) { if (authenticatorData.getAttestedCredentialData() != null) { throw new ConstraintViolationException("attestedCredentialData must be null on authentication"); } } AuthenticationDataValidator(List<CustomAuthenticationValidator> customAuthenticationValidators);  AuthenticationDataValidator(); @SuppressWarnings("deprecation") void validate(AuthenticationData authenticationData, AuthenticationParameters authenticationParameters); CoreMaliciousCounterValueHandler getMaliciousCounterValueHandler(); void setMaliciousCounterValueHandler(CoreMaliciousCounterValueHandler maliciousCounterValueHandler); List<CustomAuthenticationValidator> getCustomAuthenticationValidators();  }
@Test void validateAuthenticatorData_with_non_null_AttestedCredentialData(@Mock AuthenticatorData<AuthenticationExtensionAuthenticatorOutput> authenticatorData) { AttestedCredentialData attestedCredentialData = mock(AttestedCredentialData.class); when(authenticatorData.getAttestedCredentialData()).thenReturn(attestedCredentialData); assertThatThrownBy(() -> target.validateAuthenticatorData(authenticatorData)).isInstanceOf(ConstraintViolationException.class); }