add controller unit tests

added more unit tests to controller