protected void handleResponse(HttpRequest request, HttpResponse response,
      SelendroidResponse result) {
    if (result != null) {
      String resultString = result.render();
      response.setContentType("application/json");
      response.setEncoding(Charset.forName("UTF-8"));
      response.setContent(resultString);
      response.setStatus(200);
    } else {
      replyWithServerError(response);
    }

    response.end();
  }
adds all the handlers to this registry: {@link #getHandler}, {@link #postHandler},
{@link #deleteHandler}
selendroid-server-common/src/main/java/io/selendroid/server/common/BaseServlet.java