     assert {:ok, false} = MarcoPolo.db_exists?(c, "nonexistent", "plocal")
   end
 
-  test "create_db/4" do
+  test "create_db/4 with a database that doens't exist yet" do
     {:ok, c} = conn_server()
     assert :ok = MarcoPolo.create_db(c, "MarcoPoloTestGeneratedDb", :document, :plocal)
   end
 
-  test "drop_db/3" do
+  test "create_db/4 with a database that already exists" do
+    {:ok, c} = conn_server()
+
+    assert {:error, %Error{} = err} = MarcoPolo.create_db(c, TestHelpers.db_name, :document, :plocal)
+    assert [{exception, msg}] = err.errors
+    assert exception == "com.orientechnologies.orient.core.exception.ODatabaseException"
+    assert msg       =~ "Database named 'MarcoPoloTestDb' already exists:"
+  end
+
+  test "drop_db/3 with an existing database" do
     {:ok, c} = conn_server()
     assert :ok = MarcoPolo.drop_db(c, "MarcoPoloToDrop", :memory)
+  end
+
+  test "drop_db/3 with a non-existing database" do
+    {:ok, c} = conn_server()
+
+    expected = {"com.orientechnologies.orient.core.exception.OStorageException",
+                "Database with name 'Nonexistent' doesn't exits."}
+
+    assert {:error, %MarcoPolo.Error{} = err} = MarcoPolo.drop_db(c, "Nonexistent", :plocal)
+    assert hd(err.errors) == expected
   end
 
   test "db_reload/1" do

    assert is_integer(version)
  end

  test "command/3: SELECT query" do
    {:ok, c}       = conn_db()
    {:ok, records} = MarcoPolo.command(c, "SELECT FROM Schemaless", fetch_plan: "*:-1")


defmodule MarcoPoloTest do
  use ExUnit.Case, async: true

  alias MarcoPolo.Error

  @db_name TestHelpers.db_name()

