package com.braintree.facade.backoffice.impl;

import com.braintree.transaction.service.BrainTreeTransactionService;
import de.hybris.bootstrap.annotations.UnitTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;

import java.util.Collections;
import java.util.List;

import static org.mockito.Matchers.any;
import static org.mockito.Mockito.verify;

@UnitTest
@RunWith(MockitoJUnitRunner.class)
public class DefaultBraintreeBackofficeRefreshPaymentStatusFacadeTest {

    @Mock
    private BrainTreeTransactionService brainTreeTransactionService;

    @InjectMocks
    private DefaultBraintreeBackofficeRefreshPaymentStatusFacade unit;

    @Test
    public void updateBraintreePaymentTransactionStatusesTest() {
        unit.updateBraintreePaymentTransactionStatuses(Collections.emptyList());

        verify(brainTreeTransactionService).updateBraintreePaymentTransactionStatuses(any(List.class));
    }
}
