Added unit tests for invoice and template controllers