         (is (= (get-and-check-port "65534") "65534"))
         (is (= (get-and-check-port "65535") "65535"))))
 
+(deftest test-get-and-check-port-zero
+    "Check the function clouseau.core/get-and-check-port."
+    (testing "the function clouseau.core/get-and-check-port."
+        (is (thrown? AssertionError (get-and-check-port "0")))))
+
 (deftest test-get-and-check-port-negative
     "Check the function clouseau.core/get-and-check-port."
     (testing "the function clouseau.core/get-and-check-port."
         (is (thrown? AssertionError (get-and-check-port "-1")))
-        (is (thrown? AssertionError (get-and-check-port "0")))
+        (is (thrown? AssertionError (get-and-check-port "-2")))
+        (is (thrown? AssertionError (get-and-check-port "-65536")))
+        (is (thrown? AssertionError (get-and-check-port "-65537")))
+        (is (thrown? AssertionError (get-and-check-port "-1000000")))))
+
+(deftest test-get-and-check-port-too-big
+    "Check the function clouseau.core/get-and-check-port."
+    (testing "the function clouseau.core/get-and-check-port."
         (is (thrown? AssertionError (get-and-check-port "65536")))
         (is (thrown? AssertionError (get-and-check-port "65537")))
         (is (thrown? AssertionError (get-and-check-port "1000000")))))
+
+(deftest test-get-and-check-port-wrong-argument
+    "Check the function clouseau.core/get-and-check-port."
+    (testing "the function clouseau.core/get-and-check-port."
+        (is (thrown? NumberFormatException (get-and-check-port nil)))
+        (is (thrown? NumberFormatException (get-and-check-port "")))))
 
 (deftest test-start-server-positive-1
     (testing "clouseau.core/start-server"

;;;
;;;   Clouseau
;;; 
;;;    Copyright (C) 2015 Pavel Tisnovsky <ptisnovs@redhat.com>
;;; 
;;; Clouseau is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by

    (testing "clouseau.core/start-server"
        ; use mock instead of jetty/run-jetty
        (with-redefs [jetty/run-jetty (fn [app port] port)]
            (is (= {:port -2}      (start-server "-2")))
            (is (= {:port -1}      (start-server "-1")))
            (is (= {:port 0}       (start-server "0")))
            (is (= {:port 65536}   (start-server "65536")))
            (is (= {:port 65537}   (start-server "65537")))
            (is (= {:port 1000000} (start-server "1000000"))))))

(deftest test-show-help
    (testing "clouseau.core/show-help"
        ; use mock instead of println function
        (with-redefs [println (fn [string] string)]
            (is (= "help"         (show-help {:summary "help"})))
            (is (= "line1\nline2" (show-help {:summary "line1\nline2"}))))))

(deftest test-main-basic
    (testing "clouseau.core/-main"
        ; use mock instead of jetty/run-jetty
