def METHOD_NAME(self):
    """Performs the test of the vnc server"""
    self.validate_variables()
    self.set_timeout()
    self.vprint(2, "now running vnc test")
    cmd = "%s -compresslevel 0 -passwd %s -vncQuality 0 %s /dev/null" \
          % (which("vncsnapshot"), self.passwdfile, self.server)
    result, output = self.run(cmd)
    if result == 0:
        if not output:
            return (WARNING, "Test passed but no output was received " \
                           + "from vncsnapshot program, abnormal "     \
                           + "condition, please check.")
        else:
            msg = "vnc logged in and image obtained successfully"
            if self.verbosity >= 1:
                line1 = output.split("\n")[0]
                if line1[:36] == "VNC server supports protocol version":
                    msg += ". %s" % line1
                return (OK, msg)
            else:
                return (OK, msg)
    else:
        if not output:
            return (CRITICAL, "Connection failed. " \
                            + "There was no output from vncsnapshot")
        else:
            if output.split("\n")[0][:36] == \
                                    "VNC server supports protocol version":
                output = "".join(output.split("\n")[1:])
            if "Connection refused" in output and self.verbosity == 0:
                output = "Connection refused"
            return (CRITICAL, "Error connecting to vnc server - %s" \
                                    % output.replace("\n", " ").rstrip(" "))