Make mocked docker more accurate, add tests for more cases