adding tests for app factory