private static JavacRemoteProto.Message.Response.CompileMessage.Kind convertKind(Diagnostic.Kind kind) {
    switch (kind) {
      case ERROR: return JavacRemoteProto.Message.Response.CompileMessage.Kind.ERROR;
      case MANDATORY_WARNING: return JavacRemoteProto.Message.Response.CompileMessage.Kind.MANDATORY_WARNING;
      case WARNING: return JavacRemoteProto.Message.Response.CompileMessage.Kind.WARNING;
      case NOTE: return JavacRemoteProto.Message.Response.CompileMessage.Kind.NOTE;
      default:
        return JavacRemoteProto.Message.Response.CompileMessage.Kind.OTHER;
    }
  }
private static JavacRemoteProto.Message.Response.CompileMessage.Kind convertKind(Diagnostic.Kind kind)