### Question:
OAuthClientDetailsMapper implements DataMapper<OAuthClientDetails, OAuthClientDetailsDto> { @Override public OAuthClientDetailsDto mapEntityToDto(OAuthClientDetails input) { OAuthClientDetailsDto oauthClientDetailsDto = new OAuthClientDetailsDto(); oauthClientDetailsDto.setClientId(input.getClientId()); oauthClientDetailsDto.setClientSecret(input.getClientSecret()); oauthClientDetailsDto.setWebServerRedirectUri(input.getWebServerRedirectUri()); oauthClientDetailsDto.setAccessTokenValidity(input.getAccessTokenValidity()); oauthClientDetailsDto.setRefreshTokenValidity(input.getRefreshTokenValidity()); return oauthClientDetailsDto; }  @Override OAuthClientDetails mapDtoToEntity(OAuthClientDetailsDto input); @Override OAuthClientDetailsDto mapEntityToDto(OAuthClientDetails input); @Override Collection<OAuthClientDetails> mapDtosToEntities(Collection<OAuthClientDetailsDto> input); @Override Collection<OAuthClientDetailsDto> mapEntitiesToDtos(Collection<OAuthClientDetails> input);  }### Answer:
@Test public void mapEntityToDto_expectAllMapped() { oauthClientDetails.setClientId("Test123"); oauthClientDetails.setClientSecret("TestABC"); oauthClientDetails.setRefreshTokenValidity(10); oauthClientDetails.setAccessTokenValidity(10); oauthClientDetails.setWebServerRedirectUri("localhost"); oauthClientDetails.setAdditionalInformation("Hallo 123"); oauthClientDetails.setAuthorities("Authorities"); oauthClientDetails.setAuthorizedGrantTypes("Grant Types"); oauthClientDetails.setAutoapprove("OKR Tool Approves"); oauthClientDetails.setResourceIds("Resource Ids"); oauthClientDetails.setScope("scope"); oauthClientDetailsDto = oauthClientDetailsMapper.mapEntityToDto(oauthClientDetails); assertEquals(oauthClientDetails.getClientId(), oauthClientDetailsDto.getClientId()); assertEquals(oauthClientDetails.getClientSecret(), oauthClientDetailsDto.getClientSecret()); assertEquals( oauthClientDetails.getRefreshTokenValidity(), oauthClientDetailsDto.getRefreshTokenValidity()); assertEquals( oauthClientDetails.getAccessTokenValidity(), oauthClientDetailsDto.getAccessTokenValidity()); assertEquals( oauthClientDetails.getWebServerRedirectUri(), oauthClientDetailsDto.getWebServerRedirectUri()); }