@Test
public void validateCaptureCashFlowWhenTotalCapitalAndTotalLiabilityIsNegative() throws Exception {

    when(validationContext.getMessageContext()).thenReturn(messageContext);
    CashFlowDetail cashFlowDetail = new CashFlowDetail(EMPTY_LIST);
    cashFlowDetail.setTotalCapital(new BigDecimal(-23));
    cashFlowDetail.setTotalLiability(new BigDecimal(-1));
    CashFlowForm cashFlowForm = new CashFlowForm(cashFlowDetail, true, null, 0d);
    cashFlowValidator.validateCaptureCashFlow(cashFlowForm, validationContext);
    verify(validationContext).getMessageContext();
    verify(messageContext).addMessage(argThat(new MessageMatcher(CashFlowConstants.TOTAL_CAPITAL_SHOULD_BE_GREATER_THAN_ZERO)));
    verify(messageContext).addMessage(argThat(new MessageMatcher(CashFlowConstants.TOTAL_LIABILITY_SHOULD_BE_NON_NEGATIVE)));
}