Better unit test case for #1649 (through mocking log router).