This test appears identical to the one in the default case. Study eventually makes clear that a different setting for the first value will cause SetEnvironmentVariable to be called so Environment.SpecialFolder.CommonApplicationData will yield a different result; but it seems a fragile test. For example, if the environment variable name was changed in some places (but not in the test code above) it would still pass, but it would not be testing what you want.