static public String convertResponseToString(Object response, Object command) {
    if (!(response instanceof String)) {
      throw new RuntimeException("Expected String but received (" 
        + response.getClass() + ") " + response + "\n in response to command " + command);
    }
    return (String) response;
  }