Removed code that caused unit test to fail. Also added unit test method
that does not call UI popup.