added unit tests for controllers