Either create your database ahead of time (using either the portal or the Azure SDK), or create via MongoDB.
Not sure how you tried attaching to testdb but from the shell, you should be able to execute:
use testdb
Once you do this, you can execute something like
db.newcollection.save({foo:"bar"})
This will result in a new collection created, within testdb. You can see this via show dbs:
globaldb:PRIMARY> show dbs
admin 0.000GB
testdb 0.000GB
Note: When you create a collection implicitly this way (vs creating explicitly via either the portal or the Cosmos DB SDK), you will get a default RU setting for the collection (1000 RU currently), and would need to adjust accordingly via the portal afterward to suit your needs.