@Test
public void validateCaptureCashFlow() throws Exception {

    when(validationContext.getMessageContext()).thenReturn(messageContext);
    CashFlowDetail cashFlowDetail = new CashFlowDetail(EMPTY_LIST);
    cashFlowDetail.setTotalCapital(new BigDecimal(123d));
    cashFlowDetail.setTotalLiability(new BigDecimal(456d));
    CashFlowForm cashFlowForm = new CashFlowForm(cashFlowDetail, true, null, 0d);
    cashFlowValidator.validateCaptureCashFlow(cashFlowForm, validationContext);
    verify(validationContext).getMessageContext();
    verify(messageContext, never()).addMessage(Matchers.<MessageResolver>anyObject());
}