Oracle 11G Can't create database from template
The last two entries have unbalanced parenthesis. You're not closing the top-level parens.

TEST =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = Test)
    )
  )              -- add this
med =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = med)
    )
  )              -- add this


(Don't add the comments though.)

Might be a good idea to be consistent with casing everywhere (even though I'm not sure it actually matters). If you call your database TEST, put TEST everywhere, not Test in some places and TEST in others.