@Override public UnRegisterNodeManagerResponse unRegisterNodeManager( UnRegisterNodeManagerRequest request) throws YarnException, IOException { if (exception) { throw new YarnException("testMessage"); } return UnRegisterNodeManagerResponse.newInstance(); } }