Output Window Service testing

Add integration tests for the output window service, resulting in several bug fixes in the implementation.