AuthenticationExtensionsClientInputsConverter { public <T extends ExtensionClientInput> AuthenticationExtensionsClientInputs<T> convert(String value) { if (value == null) { return null; } return jsonConverter.readValue(value, new TypeReference<AuthenticationExtensionsClientInputs<T>>() {}); } AuthenticationExtensionsClientInputsConverter(ObjectConverter objectConverter); AuthenticationExtensionsClientInputs<T> convert(String value); String convertToString(AuthenticationExtensionsClientInputs<T> value);  }
@Test void convertRegistrationExtensions_null_test() { AuthenticationExtensionsClientInputs<RegistrationExtensionClientInput> value = authenticationExtensionsClientInputsConverter.convert(null); assertThat(value).isNull(); }
@Test void convert_test() { String source = "{\"appid\":\"dummy\"}"; AuthenticationExtensionsClientInputs<AuthenticationExtensionClientInput> clientInputs = authenticationExtensionsClientInputsConverter.convert(source); assertThat(clientInputs.getExtension(FIDOAppIDExtensionClientInput.class)).isEqualTo(new FIDOAppIDExtensionClientInput("dummy")); }
@SuppressWarnings("unused") @Test void convert_with_invalid_extension_test() { String source = "{\"invalid\":\"\"}"; AuthenticationExtensionsClientInputs<RegistrationExtensionClientInput> extensions = authenticationExtensionsClientInputsConverter.convert(source); assertThat(extensions.getUnknownKeys()).contains("invalid"); }