A try to make Appcelerator Alloy unit-testable