### Question:
DefaultWirecardPaymentCommandService implements PaymentCommandService { @Override public Payment sendRequest(final Payment payment, String url, WirecardAuthenticationModel wirecardAuthenticationModel) throws WirecardPaymenException { String xmlRequest = getPaymentConverter().convertDataToXML(payment); String xmlResponse = getResponse(configureHttpRequest(xmlRequest, url, wirecardAuthenticationModel)); Payment paymentResponse = getPaymentConverter().convertXMLToData(xmlResponse); checkFingerprint(payment, paymentResponse); return paymentResponse; }  @Override Payment sendRequest(final Payment payment, String url, WirecardAuthenticationModel wirecardAuthenticationModel); @Override int sendTestAuthenticationRequest(String url, WirecardAuthenticationModel wirecardAuthenticationModel); @Override String sendSearchRequest(String url, WirecardAuthenticationModel wirecardAuthenticationModel); @Required void setBasicResponseHandler(BasicResponseHandler basicResponseHandler); @Required void setPaymentConverter(PaymentConverter paymentConverter);  }### Answer:
@Test public void testAuthorizationSendRequest() throws WirecardPaymenException { when(paymentMethod.getName()).thenReturn(PaymentMethodName.PAYPAL); Payment response = defaultWirecardPayPalService.sendRequest(payment, AUTHORIZATION_URL, wirecardPaymentMethodConfiguration); assertNotNull(RESPONSE_NULL, response); assertEquals(RESPONSE_EQUALS, payment, response); }
@Test public void testCaptureSendRequest() throws WirecardPaymenException { when(paymentMethod.getName()).thenReturn(PaymentMethodName.PAYPAL); Payment response = defaultWirecardPayPalService.sendRequest(payment, CAPTURE_URL, wirecardPaymentMethodConfiguration); assertNotNull(RESPONSE_NULL, response); assertEquals(RESPONSE_EQUALS, this.payment, response); }
@Test public void refundTest() throws WirecardPaymenException { when(paymentMethod.getName()).thenReturn(PaymentMethodName.PAYPAL); Payment response = defaultWirecardPayPalService.sendRequest(payment, REFUND_URL, wirecardPaymentMethodConfiguration); assertNotNull(RESPONSE_NULL, response); assertEquals(RESPONSE_EQUALS, this.payment, response); }
@Test public void fingerPrintTest() throws WirecardPaymenException { when(paymentMethod.getName()).thenReturn(PaymentMethodName.RATEPAY_INVOICE); when(device.getFingerprint()).thenReturn(FINGERPRINT); Payment response = defaultWirecardPayPalService.sendRequest(payment, REFUND_URL, wirecardPaymentMethodConfiguration); when(response.getDevice()).thenReturn(device); assertNotNull(RESPONSE_NULL, response); assertEquals(RESPONSE_EQUALS, this.payment, response); }