BeanAssertUtil { public static void validate(RegistrationData registrationData) { validate((CoreRegistrationData) registrationData); validateAuthenticationExtensionsClientOutputs(registrationData.getClientExtensions()); validate(registrationData.getCollectedClientData()); } private  BeanAssertUtil(); static void validate(RegistrationData registrationData); static void validate(CoreRegistrationData registrationData); static void validate(RegistrationParameters registrationParameters); static void validate(CoreRegistrationParameters registrationParameters); static void validate(AuthenticationData authenticationData); static void validate(CoreAuthenticationData authenticationData); static void validate(AuthenticationParameters authenticationParameters); static void validate(CoreAuthenticationParameters authenticationParameters); static void validate(CollectedClientData collectedClientData); static void validate(TokenBinding tokenBinding); static void validate(AttestationObject attestationObject); static void validate(AuthenticatorData<T> authenticatorData); static void validate(AttestedCredentialData attestedCredentialData); @SuppressWarnings("unused") static void validateAuthenticationExtensionsClientOutputs(
            AuthenticationExtensionsClientOutputs<T> authenticationExtensionsClientOutputs); @SuppressWarnings("unused") static void validateAuthenticatorExtensionsOutputs(
            AuthenticationExtensionsAuthenticatorOutputs<T> authenticationExtensionsAuthenticatorOutputs); static void validate(ServerProperty serverProperty); static void validate(CoreServerProperty serverProperty); static void validate(AttestationStatement attestationStatement); static void validate(COSEKey coseKey);  }
@Test void validate_RegistrationData_with_attestationObject_null_test() { RegistrationData registrationData = new RegistrationData( null, new byte[32], TestDataUtil.createClientData(ClientDataType.CREATE), new byte[32], new AuthenticationExtensionsClientOutputs<>(), new HashSet<>() ); assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate(registrationData) ); }
@Test void validate_RegistrationData_with_attestationObjectBytes_null_test() { RegistrationData registrationData = new RegistrationData( TestDataUtil.createAttestationObjectWithFIDOU2FAttestationStatement(), null, TestDataUtil.createClientData(ClientDataType.CREATE), new byte[32], new AuthenticationExtensionsClientOutputs<>(), new HashSet<>() ); assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate(registrationData) ); }
@Test void validate_RegistrationData_with_collectedClientData_null_test() { RegistrationData registrationData = new RegistrationData( TestDataUtil.createAttestationObjectWithFIDOU2FAttestationStatement(), new byte[32], null, new byte[32], new AuthenticationExtensionsClientOutputs<>(), new HashSet<>() ); assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate(registrationData) ); }
@Test void validate_RegistrationData_with_clientDataBytes_null_test() { RegistrationData registrationData = new RegistrationData( TestDataUtil.createAttestationObjectWithFIDOU2FAttestationStatement(), new byte[32], TestDataUtil.createClientData(ClientDataType.CREATE), null, new AuthenticationExtensionsClientOutputs<>(), new HashSet<>() ); assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate(registrationData) ); }
@Test void validate_RegistrationData_with_clientExtensions_null_test() { RegistrationData registrationData = new RegistrationData( TestDataUtil.createAttestationObjectWithFIDOU2FAttestationStatement(), new byte[32], TestDataUtil.createClientData(ClientDataType.CREATE), new byte[32], null, new HashSet<>() ); assertDoesNotThrow( () -> BeanAssertUtil.validate(registrationData) ); }
@Test void validate_RegistrationData_with_transports_null_test() { RegistrationData registrationData = new RegistrationData( TestDataUtil.createAttestationObjectWithFIDOU2FAttestationStatement(), new byte[32], TestDataUtil.createClientData(ClientDataType.CREATE), new byte[32], new AuthenticationExtensionsClientOutputs<>(), null ); assertDoesNotThrow( () -> BeanAssertUtil.validate(registrationData) ); }
@Test void validate_RegistrationParameters_test() { RegistrationParameters registrationParameters = new RegistrationParameters( TestDataUtil.createServerProperty(), true ); BeanAssertUtil.validate(registrationParameters); }
@Test void validate_RegistrationParameters_with_null_test() { assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate((RegistrationParameters) null) ); }
@Test void validate_RegistrationParameters_with_serverProperty_null_test() { RegistrationParameters registrationParameters = new RegistrationParameters( null, true ); assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate(registrationParameters) ); }
@Test void validate_AuthenticationData_test() { AuthenticationData authenticationData = new AuthenticationData( new byte[32], new byte[32], TestDataUtil.createAuthenticatorData(), new byte[32], TestDataUtil.createClientData(ClientDataType.GET), new byte[32], new AuthenticationExtensionsClientOutputs<>(), new byte[32] ); BeanAssertUtil.validate(authenticationData); }
@Test void validate_AuthenticationData_with_null_test() { assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate((AuthenticationData) null) ); }
@Test void validate_AuthenticationData_with_credentialId_null_test() { AuthenticationData authenticationData = new AuthenticationData( null, new byte[32], TestDataUtil.createAuthenticatorData(), new byte[32], TestDataUtil.createClientData(ClientDataType.GET), new byte[32], new AuthenticationExtensionsClientOutputs<>(), new byte[32] ); assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate(authenticationData) ); }
@Test void validate_AuthenticationData_with_userHandle_null_test() { AuthenticationData authenticationData = new AuthenticationData( new byte[32], null, TestDataUtil.createAuthenticatorData(), new byte[32], TestDataUtil.createClientData(ClientDataType.GET), new byte[32], new AuthenticationExtensionsClientOutputs<>(), new byte[32] ); assertDoesNotThrow( () -> BeanAssertUtil.validate(authenticationData) ); }
@Test void validate_AuthenticationData_with_authenticatorData_null_test() { AuthenticationData authenticationData = new AuthenticationData( new byte[32], new byte[32], null, new byte[32], TestDataUtil.createClientData(ClientDataType.GET), new byte[32], new AuthenticationExtensionsClientOutputs<>(), new byte[32] ); assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate(authenticationData) ); }
@Test void validate_AuthenticationData_with_authenticatorDataBytes_null_test() { AuthenticationData authenticationData = new AuthenticationData( new byte[32], new byte[32], TestDataUtil.createAuthenticatorData(), null, TestDataUtil.createClientData(ClientDataType.GET), new byte[32], new AuthenticationExtensionsClientOutputs<>(), new byte[32] ); assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate(authenticationData) ); }
@Test void validate_AuthenticationData_with_collectedClientData_null_test() { AuthenticationData authenticationData = new AuthenticationData( new byte[32], new byte[32], TestDataUtil.createAuthenticatorData(), new byte[32], null, new byte[32], new AuthenticationExtensionsClientOutputs<>(), new byte[32] ); assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate(authenticationData) ); }
@Test void validate_AuthenticationData_with_clientDataBytes_null_test() { AuthenticationData authenticationData = new AuthenticationData( new byte[32], new byte[32], TestDataUtil.createAuthenticatorData(), new byte[32], TestDataUtil.createClientData(ClientDataType.GET), null, new AuthenticationExtensionsClientOutputs<>(), new byte[32] ); assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate(authenticationData) ); }
@Test void validate_AuthenticationData_with_clientExtensions_null_test() { AuthenticationData authenticationData = new AuthenticationData( new byte[32], new byte[32], TestDataUtil.createAuthenticatorData(), new byte[32], TestDataUtil.createClientData(ClientDataType.GET), new byte[32], null, new byte[32] ); assertDoesNotThrow( () -> BeanAssertUtil.validate(authenticationData) ); }
@Test void validate_AuthenticationData_with_signature_null_test() { AuthenticationData authenticationData = new AuthenticationData( new byte[32], new byte[32], TestDataUtil.createAuthenticatorData(), new byte[32], TestDataUtil.createClientData(ClientDataType.GET), new byte[32], new AuthenticationExtensionsClientOutputs<>(), null ); assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate(authenticationData) ); }
@Test void validate_AuthenticationParameters_test() { AuthenticationParameters authenticationParameters = new AuthenticationParameters( TestDataUtil.createServerProperty(), TestDataUtil.createAuthenticator(), true, true ); BeanAssertUtil.validate(authenticationParameters); }
@Test void validate_AuthenticationParameters_with_null_test() { assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate((AuthenticationParameters) null) ); }
@Test void validate_AuthenticationParameters_with_serverProperty_null_test() { AuthenticationParameters authenticationParameters = new AuthenticationParameters( null, TestDataUtil.createAuthenticator(), true, true ); assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate(authenticationParameters) ); }
@Test void validate_AuthenticationParameters_with_authenticator_null_test() { AuthenticationParameters authenticationParameters = new AuthenticationParameters( TestDataUtil.createServerProperty(), null, true, true ); assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate(authenticationParameters) ); }
@Test void validate_clientData_test() { CollectedClientData collectedClientData = new CollectedClientData( ClientDataType.GET, new DefaultChallenge(), new Origin("https: new TokenBinding(TokenBindingStatus.PRESENT, new byte[32]) ); BeanAssertUtil.validate(collectedClientData); }
@Test void validate_clientData_with_null_test() { assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate((CollectedClientData) null) ); }
@Test void validate_clientData_with_clientDataType_null_test() { CollectedClientData collectedClientData = new CollectedClientData( null, new DefaultChallenge(), new Origin("https: new TokenBinding(TokenBindingStatus.PRESENT, new byte[32]) ); assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate(collectedClientData) ); }
@Test void validate_clientData_with_challenge_null_test() { CollectedClientData collectedClientData = new CollectedClientData( ClientDataType.GET, null, new Origin("https: new TokenBinding(TokenBindingStatus.PRESENT, new byte[32]) ); assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate(collectedClientData) ); }
@Test void validate_clientData_with_origin_null_test() { CollectedClientData collectedClientData = new CollectedClientData( ClientDataType.GET, new DefaultChallenge(), null, new TokenBinding(TokenBindingStatus.PRESENT, new byte[32]) ); assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate(collectedClientData) ); }
@Test void validate_clientData_with_tokenBinding_null_test() { CollectedClientData collectedClientData = new CollectedClientData( ClientDataType.GET, new DefaultChallenge(), new Origin("https: null ); BeanAssertUtil.validate(collectedClientData); }
@Test void validate_tokenBinding_test() { TokenBinding tokenBinding = new TokenBinding(TokenBindingStatus.PRESENT, new byte[32]); BeanAssertUtil.validate(tokenBinding); }
@Test void validate_tokenBinding_with_not_supported_status_test() { TokenBinding tokenBinding = new TokenBinding(TokenBindingStatus.NOT_SUPPORTED, (String) null); BeanAssertUtil.validate(tokenBinding); }
@Test void validate_tokenBinding_with_supported_status_test() { TokenBinding tokenBinding = new TokenBinding(TokenBindingStatus.SUPPORTED, (String) null); BeanAssertUtil.validate(tokenBinding); }
@Test void validate_tokenBinding_with_status_null_test() { TokenBinding tokenBinding = new TokenBinding(null, (String) null); assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate(tokenBinding) ); }
@Test void validate_attestationObject_test() { AttestationObject attestationObject = new AttestationObject(TestDataUtil.createAuthenticatorData(), TestAttestationStatementUtil.createFIDOU2FAttestationStatement()); BeanAssertUtil.validate(attestationObject); }
@Test void validate_attestationObject_with_null_test() { assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate((AttestationObject) null) ); }
@Test void validate_attestationObject_with_authenticatorData_null_test() { AttestationObject attestationObject = new AttestationObject(null, TestAttestationStatementUtil.createFIDOU2FAttestationStatement()); assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate(attestationObject) ); }
@Test void validate_attestationObject_with_attestationStatement_null_test() { AttestationObject attestationObject = new AttestationObject(TestDataUtil.createAuthenticatorData(), null); assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate(attestationObject) ); }
@Test void validate_RegistrationData_test() { RegistrationData registrationData = new RegistrationData( TestDataUtil.createAttestationObjectWithFIDOU2FAttestationStatement(), new byte[32], TestDataUtil.createClientData(ClientDataType.CREATE), new byte[32], new AuthenticationExtensionsClientOutputs<>(), new HashSet<>() ); BeanAssertUtil.validate(registrationData); }
@Test void validate_RegistrationData_with_null_test() { assertThrows(ConstraintViolationException.class, () -> BeanAssertUtil.validate((RegistrationData) null) ); }