@Test
void serialize_deserialize_test() {

    //Given
    byte[] rpIdHash = new byte[32];
    byte flags = BIT_ED;
    AuthenticationExtensionsAuthenticatorOutputs.BuilderForRegistration builder = new AuthenticationExtensionsAuthenticatorOutputs.BuilderForRegistration();
    builder.setUvm(new UvmEntries());
    AuthenticatorData<RegistrationExtensionAuthenticatorOutput> authenticatorData =
            new AuthenticatorData<>(rpIdHash, flags, 0, builder.build());
    //When
    byte[] serialized = new AuthenticatorDataConverter(objectConverter).convert(authenticatorData);
    AuthenticatorData<RegistrationExtensionAuthenticatorOutput> result = new AuthenticatorDataConverter(objectConverter).convert(serialized);
    //Then
    assertThat(result.getRpIdHash()).isNotNull();
    assertThat(result.getRpIdHash()).hasSize(32);
    assertThat(result.getFlags()).isEqualTo(BIT_ED);
    assertThat(result.getSignCount()).isZero();
    assertThat(result.getAttestedCredentialData()).isNull();
    assertThat(result.getExtensions().getKeys()).contains(UserVerificationMethodExtensionAuthenticatorOutput.ID);
}