updated deprecated test code
models can be passed when creating a new collection