String servicesJSON = "{\"services\" : \"HDFS\"";
StackAdvisorData data = new StackAdvisorData(hostsJSON, servicesJSON);
doReturn(hostsJSON).when(command).getHostsInformation(request);
doReturn(servicesJSON).when(command).getServicesInformation(request);
doReturn(data).when(command)
<BUG>.adjust(any(StackAdvisorData.class), any(StackAdvisorRequest.class));
when(saRunner.runScript(any(String.class), any(StackAdvisorCommandType.class), any(File.class)))

.thenReturn(false);</BUG>
command.invoke(request);

String servicesJSON = "{\"services\" : \"HDFS\"";
StackAdvisorData data = new StackAdvisorData(hostsJSON, servicesJSON);
doReturn(hostsJSON).when(command).getHostsInformation(request);
doReturn(servicesJSON).when(command).getServicesInformation(request);
doReturn(data).when(command)
.adjust(any(StackAdvisorData.class), any(StackAdvisorRequest.class));
doThrow(new StackAdvisorRequestException("error")).when(saRunner)
.runScript(any(String.class), any(StackAdvisorCommandType.class), any(File.class));
command.invoke(request);
