@Test
public void handleSellTransactionCancelledEvent() {

    TransactionView transactionView = new TransactionView();
    transactionView.setIdentifier(transactionIdentifier.getIdentifier());
    transactionView.setAmountOfExecutedItems(0);
    transactionView.setPricePerItem(DEFAULT_ITEM_PRICE);
    transactionView.setState(STARTED);
    transactionView.setAmountOfItems(DEFAULT_TOTAL_ITEMS);
    transactionView.setCompanyName(DEFAULT_COMPANY_NAME);
    transactionView.setOrderBookId(orderBookIdentifier.getIdentifier());
    transactionView.setPortfolioId(portfolioIdentifier.getIdentifier());
    transactionView.setType(SELL);
    when(transactionViewRepository.findOne(transactionIdentifier.getIdentifier())).thenReturn(transactionView);
    testSubject.on(new SellTransactionCancelledEvent(transactionIdentifier,
                                                     DEFAULT_TOTAL_ITEMS,
                                                     DEFAULT_TOTAL_ITEMS));
    verify(transactionViewRepository).save(argThat(new TransactionEntryMatcher(
            DEFAULT_TOTAL_ITEMS, 0, DEFAULT_COMPANY_NAME, DEFAULT_ITEM_PRICE, CANCELLED, SELL
    )));
}