### Question:
RequestClaimDtoDecorator implements RequestClaimDtoMapper { @Override public RequestClaimDto map(RequestClaim r) { RequestClaimDto dto = delegate.map(r); if (dto != null) { RequestDto request = requestService.findRequest(r.getRequestId()); dto.setUrl(createLink(request.getIssueInformation())); dto.setTitle(request.getIssueInformation().getTitle()); dto.setFundRequestUrl(createFundRequestLink(request.getId())); } return dto; }  @Override RequestClaimDto map(RequestClaim r);  }### Answer:
@Test public void map() { final RequestClaim requestClaim = RequestClaim.builder() .id(657L) .address("0xE51551D3B11eF7559164D051D9714E59A1c4E486") .status(ClaimRequestStatus.PENDING) .flagged(false) .requestId(9L) .solver("ghjgfhg") .build(); final RequestClaimDto requestClaimDto = new RequestClaimDto(); final RequestDto requestDto = RequestDtoMother.fundRequestArea51(); final IssueInformationDto issueInformation = requestDto.getIssueInformation(); when(delegate.map(requestClaim)).thenReturn(requestClaimDto); when(requestService.findRequest(requestClaim.getRequestId())).thenReturn(requestDto); final RequestClaimDto result = decorator.map(requestClaim); assertThat(result.getTitle()).isEqualTo(requestDto.getIssueInformation().getTitle()); assertThat(result.getUrl()).isEqualTo("https: assertThat(result.getFundRequestUrl()).isEqualTo("https: }
@Test public void map_null() { final RequestClaim requestClaim = RequestClaim.builder() .id(657L) .address("0xE51551D3B11eF7559164D051D9714E59A1c4E486") .status(ClaimRequestStatus.PENDING) .flagged(false) .requestId(9L) .solver("ghjgfhg") .build(); when(delegate.map(requestClaim)).thenReturn(null); final RequestClaimDto result = decorator.map(requestClaim); assertThat(result).isNull(); }