### Question:
DefaultWirecardTransactionService implements WirecardTransactionService { @Override public PaymentTransactionEntryModel logTransactionData(WirecardTransactionData wirecardTransactionData) { PaymentTransactionModel transaction = createTransaction(wirecardTransactionData); return createTransactionEntry(wirecardTransactionData, transaction); }  @Override PaymentTransactionModel createTransaction(WirecardTransactionData wirecardTransactionData); void calculateCart(final AbstractOrderModel abstractOrderModel); @Override PaymentTransactionEntryModel logTransactionData(WirecardTransactionData wirecardTransactionData); @Override PaymentTransactionModel lookForCompatibleTransactions(final AbstractOrderModel abstractOrder,
                                                                 final String checkoutPaymentType); @Override boolean lookForAcceptedTransactions(AbstractOrderModel abstractOrderModel, PaymentTransactionType paymentTransactionType); @Override String getParentTransactionIdToOperate(AbstractOrderModel abstractOrderModel, PaymentTransactionType paymentTransactionType); @Override PaymentTransactionEntryModel getNewestAcceptedTransactionEntry(PaymentTransactionModel paymentTransactionModel,
                                                                          PaymentTransactionType paymentTransactionType); @Override PaymentTransactionModel getPaymentTransaction(AbstractOrderModel abstractOrder); @Override TransactionStatus getTransactionStatus(Payment response); @Required void setModelService(final ModelService modelService); @Required void setWirecardPaymentService(WirecardPaymentService wirecardPaymentService); @Required void setCommerceCheckoutService(CommerceCheckoutService commerceCheckoutService); @Required void setPaymentConverter(PaymentConverter paymentConverter); @Required void setMediaService(DefaultMediaService mediaService);  }### Answer:
@Test public void testLogTransactionData() { when(order.getPaymentTransactions()).thenReturn(Collections.singletonList(transaction1)); PaymentTransactionEntryModel transaction = defaultWirecardTransactionService.logTransactionData(wirecardTransactionData); assertEquals("Transaction type does not match", PaymentTransactionType.AUTHORIZATION, transaction.getType()); assertEquals("Transaction status does not match", TransactionStatus.ACCEPTED.toString(), transaction.getTransactionStatus()); assertEquals("Transaction amount does not match", transactionAmount, transaction.getAmount()); assertEquals("Transaction subscriptionId does not match", transactionId, transaction.getSubscriptionID()); }