### Question:
DefaultWirecardPaymentService implements WirecardPaymentService { @Override public OrderStatus getOrderStatus(Payment response) { TransactionState transactionState; OrderStatus orderStatus = null; if (response != null) { transactionState = response.getTransactionState(); if (response.getTransactionType().equals(TransactionType.AUTHORIZATION)) { if (transactionState == TransactionState.SUCCESS) { orderStatus = OrderStatus.PAYMENT_AUTHORIZED; } else { orderStatus = OrderStatus.PAYMENT_NOT_AUTHORIZED; } } else if (response.getTransactionType().equals(TransactionType.CAPTURE_AUTHORIZATION) || response.getTransactionType().equals(TransactionType.DEBIT)) { if (transactionState == TransactionState.SUCCESS) { orderStatus = OrderStatus.PAYMENT_CAPTURED; } else { orderStatus = OrderStatus.PAYMENT_NOT_CAPTURED; } } } return orderStatus; }  @Override ReturnStatus getReturnStatus(Payment response); void setReturnRequestStatus(final ReturnRequestModel returnRequest, final ReturnStatus status); @Override OrderStatus getOrderStatus(Payment response); @Override void storePares(AbstractOrderModel abstractOrderModel, String pares); @Override void storeToken(AbstractOrderModel abstractOrderModel, String token); @Override void storeMPIthreeDparameters(AbstractOrderModel abstractOrderModel,
                                         String cardholderAuthenticationStatus,
                                         String cardholderAuthenticationValue,
                                         String eci,
                                         String xid); @Required void setModelService(ModelService modelService); @Required void setWirecardTransactionService(WirecardTransactionService wirecardTransactionService);  }### Answer:
@Test public void getOrderStatusAuthorizeTest() { assertEquals("Order status is authorized", OrderStatus.PAYMENT_AUTHORIZED, wirecardPaymentService.getOrderStatus(authorization)); }
@Test public void getOrderStatusCaptureTest() { assertEquals("Order status is captured", OrderStatus.PAYMENT_CAPTURED, wirecardPaymentService.getOrderStatus(capture)); }
@Test public void getOrderStatusNotAuthorizeTest() { assertEquals("Order status is not authorized", OrderStatus.PAYMENT_NOT_AUTHORIZED, wirecardPaymentService.getOrderStatus(authorizationRejected)); }
@Test public void getOrderStatusNotCaptureTest() { assertEquals("Order status is not captured", OrderStatus.PAYMENT_NOT_CAPTURED, wirecardPaymentService.getOrderStatus(captureRejected)); }