if (!simulatorService.simulatorExists(port)) {
String msg = "can not set next response for simulator. simulator on port " + port + " doesn't exist";
logger.error(msg);
return Response.status(Status.BAD_REQUEST).entity(msg).build();
}
SimulatorResponse simulatorNextResponse;
try {
simulatorNextResponse = objectMapper.readValue(simulatorResponseStr, SimulatorResponse.class);
} catch (Exception e) {
logger.error("failed parsing json request", e);
return Response.status(Status.INTERNAL_SERVER_ERROR).build();