String testHandle = stopRequest.getTestHandle();
Test test = mTests.get(testHandle);
if(result.hasErrors() ||
Strings.nullToEmpty(stopRequest.getTestHandle()).trim().isEmpty() ||
test == null) {
return new TestStopResponse(Status.illegalArgument());
}
test.setStopRequested(true);
return new TestStopResponse(Status.ok());
}