Fix style issues
Add tests for TerminalAdapter#log