Removed deprecated methods and added test method to verify newFactory()
method.