Testing a database driven application