             true  (contains "Hello world!" "world!"))))
 
 (deftest test-contains-NPE
-    "Check the function zg.utils/contains."
-    (testing "the function zg.utils/contains."
+  "Check the function zg.utils/contains."
+  (testing "the function zg.utils/contains."
         (is (thrown? NullPointerException (contains nil "")))
         (is (thrown? NullPointerException (contains "" nil)))
         (is (thrown? NullPointerException (contains nil nil)))))
 
 (deftest test-starts-with-1
-    "Check the function zg.utils/starts-with."
-    (testing "the function zg.utils/starts-with."
+  "Check the function zg.utils/starts-with."
+  (testing "the function zg.utils/starts-with."
         (are [x y] (= x y)
             false (startsWith "Hello world!" "hello")
             true  (startsWith "Hello world!" "Hello")

;

(defn callable?
    "Test if given function-name is bound to the real function."
    [function-name]
    (clojure.test/function? function-name))

;
; Tests for various functions existence
;

(deftest test-third-existence
    "Check that the zg.utils/third definition exists."
    (testing "if the zg.utils/third definition exists."
        (is (callable? 'zg.utils/third))))


(deftest test-fourth-existence
    "Check that the zg.utils/fourth definition exists."
    (testing "if the zg.utils/fourth definition exists."
        (is (callable? 'zg.utils/fourth))))


(deftest test-substring-existence
    "Check that the zg.utils/substring definition exists."
    (testing "if the zg.utils/substring definition exists."
        (is (callable? 'zg.utils/substring))))


(deftest test-startsWith-existence
    "Check that the zg.utils/startsWith definition exists."
    (testing "if the zg.utils/startsWith definition exists."
        (is (callable? 'zg.utils/startsWith))))


(deftest test-endsWith-existence
    "Check that the zg.utils/endsWith definition exists."
    (testing "if the zg.utils/endsWith definition exists."
        (is (callable? 'zg.utils/endsWith))))


(deftest test-contains-existence
    "Check that the zg.utils/contains definition exists."
    (testing "if the zg.utils/contains definition exists."
        (is (callable? 'zg.utils/contains))))


(deftest test-replaceAll-existence
    "Check that the zg.utils/replaceAll definition exists."
    (testing "if the zg.utils/replaceAll definition exists."
        (is (callable? 'zg.utils/replaceAll))))


(deftest test-get-exception-message-existence
    "Check that the zg.utils/get-exception-message definition exists."
    (testing "if the zg.utils/get-exception-message definition exists."
        (is (callable? 'zg.utils/get-exception-message))))

;
; Tests for behaviour of all functions
;

(deftest test-get-exception-message-1
    "Check the function zg.utils/get-exception-message."
    (testing "the function zg.utils/get-exception-message."
        (try
            (throw (new java.lang.Exception "Message text"))
            (is nil "Exception not thrown as expected!")
            (catch Exception e
                (is (= "Message text" (get-exception-message e)))))))

(deftest test-get-exception-message-2
    "Check the function zg.utils/get-exception-message."
    (testing "the function zg.utils/get-exception-message."
        (try
            (/ 1 0)
            (is nil "Exception not thrown as expected!")
            (catch Exception e
                (is (= "Divide by zero" (get-exception-message e)))))))

(deftest test-get-exception-message-3
    "Check the function zg.utils/get-exception-message."
    (testing "the function zg.utils/get-exception-message."
        (try
            (Integer/parseInt "unparseable")
            (is nil "Exception not thrown as expected!")

            "" (substring "Hello world!" 10 10))))

(deftest test-substring-NPE
  "Check the function zg.utils/substring."
  (testing "the function zg.utils/substring."
        (is (thrown? NullPointerException (substring nil 0 0)))
        (is (thrown? NullPointerException (substring "" nil 0)))
        (is (thrown? NullPointerException (substring "" 0 nil)))))

(deftest test-contains-1
  "Check the function zg.utils/contains."
  (testing "the function zg.utils/contains."
        (are [x y] (= x y)
            false (contains "Hello world!" "h")
            true  (contains "Hello world!" "H")
