    @Test
    public void testCaptureRejected() throws Exception {

        PaymentTransactionModel adyenTransaction = createAdyenTransaction();
        List<PaymentTransactionEntryModel> transactionEntries = new ArrayList<>();

        transactionEntries.add(createAuthorizedEntry());
        transactionEntries.add(createCaptureReceivedEntry());
        transactionEntries.add(createCaptureRejectedEntry());

        adyenTransaction.setEntries(transactionEntries);

        List<PaymentTransactionModel> transactions = new ArrayList<>();
        transactions.add(adyenTransaction);
        when(orderModelMock.getPaymentTransactions()).thenReturn(transactions);

        String result = adyenCheckCaptureAction.execute(orderProcessModelMock);

        assertEquals(AdyenCheckCaptureAction.Transition.NOK.toString(), result);
        verify(orderModelMock).setStatus(OrderStatus.PAYMENT_NOT_CAPTURED);
        verify(modelServiceMock).save(orderProcessModelMock.getOrder());
    }