TestYarnClient tests both YarnClient and YarnClientImpl. We should test YarnClient without thinking of its implementation. That's the whole point of YarnClient. There are bunch of refactors we could do. The first thing is to Split up class TestYarnClient to TestYarnClient and TestYarnClientImpl. Let TestYarnClient only tests YarnClient. All implementation related stuff go to TestYarnClientImpl.