### Question:
AuthenticationDtoConverter { public AuthenticationDto authenticationToDto(EnvironmentAuthentication authentication) { AuthenticationDto authenticationDto = AuthenticationDto.builder() .withLoginUserName(authentication.getLoginUserName()) .withPublicKey(authentication.getPublicKey()) .withPublicKeyId(authentication.getPublicKeyId()) .withManagedKey(authentication.isManagedKey()) .build(); return authenticationDto; }  EnvironmentAuthentication dtoToAuthentication(AuthenticationDto authenticationDto); AuthenticationDto authenticationToDto(EnvironmentAuthentication authentication);  }### Answer:
@Test void authenticationToDto() { EnvironmentAuthentication environment = new EnvironmentAuthentication(); environment.setId(123L); environment.setLoginUserName(LOGIN); environment.setPublicKey(PUBLIC_KEY); environment.setPublicKeyId(PUBLIC_KEY_ID); environment.setManagedKey(true); AuthenticationDto result = underTest.authenticationToDto(environment); assertThat(result) .matches(m -> Objects.equals(m.getLoginUserName(), environment.getLoginUserName())) .matches(m -> Objects.equals(m.getPublicKey(), environment.getPublicKey())) .matches(m -> Objects.equals(m.getPublicKeyId(), environment.getPublicKeyId())) .matches(m -> Objects.equals(m.isManagedKey(), environment.isManagedKey())); }