BTW for a unit test like this it is important to not mix different config sources. This test is testing the configuration object itself and verifying that it touched only the last config source. As such, I would recommend changing this test to just create 3 in-memory config sources and verify that behavior. By mixing different configuration sources there is fragility and complexity introduced into this test. In general a unit test should be able to fail due to only one primary reason. In this case there could be 4 or 5 big reasons as to why the test could fail (bug in config, bug in any of the sources, etc.).