This PS introduces functional tests for layering and substitution
scenarios working in tandem. Only unit tests currently offer this type
of coverage.
This PS is a follow-up to https://review.gerrithub.io/#/c/395610/
which adds functional tests that test success paths for basic
substitutions including the following edge cases:
* Substitution/layering works with top layer empty
* Substitution/layering works with multiple top layers empty
* Substitution/layering works with intermediate layer empty
These tests are more robust than the ones introduced by
https://review.gerrithub.io/#/c/395388/ while offering
the same exact coverage so the tests in that patch have
been removed.
This PS also fixes a subtle bug related to layering which was
causing the layering + substitution scenarios above to fail.
Change-Id: I9303a93f4d73f7fdca664b861bc5ab06f4162b79