### Question:
CredentialRequestToCreateAWSCredentialRequestConverter { public CreateAWSCredentialRequest convert(CredentialRequest source) { CreateAWSCredentialRequest credentialRequest = new CreateAWSCredentialRequest(); credentialRequest.setCredentialName(source.getName()); credentialRequest.setDescription(source.getDescription()); credentialRequest.setRoleArn(source.getAws().getRoleBased().getRoleArn()); return credentialRequest; }  CreateAWSCredentialRequest convert(CredentialRequest source);  }### Answer:
@Test void convert() { CredentialRequest request = new CredentialRequest(); request.setName("name"); request.setDescription("desc"); AwsCredentialParameters aws = new AwsCredentialParameters(); RoleBasedParameters roleBased = new RoleBasedParameters(); roleBased.setRoleArn("arn"); aws.setRoleBased(roleBased); request.setAws(aws); CreateAWSCredentialRequest result = underTest.convert(request); assertEquals(request.getName(), result.getCredentialName()); assertEquals(request.getDescription(), result.getDescription()); assertEquals(request.getAws().getRoleBased().getRoleArn(), result.getRoleArn()); }