This test-case should not pass, because there is no account called Equity in this test case. So sourceEntries will not contain an account called Equity.

I think this is throwing an InputError due to other reason.