Tinytest.add(
  'collection - call Mongo.Collection without new',
  function (test) {
    test.throws(
      function () {
        Mongo.Collection(null);
      },
      /use "new" to construct a Mongo\.Collection/
    );
  }
);

Tinytest.add('collection - call new Mongo.Collection multiple times',
  function (test) {
    new Mongo.Collection('multiple_times_1');

    test.throws(
      function () {
        new Mongo.Collection('multiple_times_1');
      },
      /There is already a collection named "multiple_times_1"/
    );
  }
);

Tinytest.add('collection - call new Mongo.Collection multiple times with _suppressSameNameError=true',
  function (test) {
    new Mongo.Collection('multiple_times_2');

    try {
      new Mongo.Collection('multiple_times_2', {_suppressSameNameError: true});
      test.ok();
    } catch (error) {
      console.log(error);
      test.fail('Expected new Mongo.Collection not to throw an error when called twice with the same name');
    }
  }
);

Tinytest.add('collection - call new Mongo.Collection with defineMutationMethods=false',
  function (test) {
    var handlerPropName = Meteor.isClient ? '_methodHandlers' : 'method_handlers';

    var hasmethods = new Mongo.Collection('hasmethods');
    test.equal(typeof hasmethods._connection[handlerPropName]['/hasmethods/insert'], 'function');

    var nomethods = new Mongo.Collection('nomethods', {defineMutationMethods: false});
    test.equal(nomethods._connection[handlerPropName]['/nomethods/insert'], undefined);
  }
);

@@ -305,32 +305,88 @@
 nction (test) %7B%0A
+    var collectionName = 'multiple_times_1_' + test.id;%0A
     new Mongo.Co
@@ -394,34 +394,30 @@
 lection(
-'multiple_times_1'
+collectionName
 );%0A%0A    
@@ -482,26 +482,22 @@
 ion(
-'multiple_times_1'
+collectionName
 );%0A 
@@ -550,27 +550,8 @@
 amed
- %22multiple_times_1%22
 /%0A  
@@ -682,24 +682,80 @@
 on (test) %7B%0A
+    var collectionName = 'multiple_times_2_' + test.id;%0A
     new Mong
@@ -767,34 +767,30 @@
 lection(
-'multiple_times_2'
+collectionName
 );%0A%0A    
@@ -826,26 +826,22 @@
 ion(
-'multiple_times_2'
+collectionName
 , %7B_
@@ -1251,16 +1251,71 @@
 lers';%0A%0A
+    var methodCollectionName = 'hasmethods' + test.id;%0A
     var 
@@ -1348,28 +1348,36 @@
 lection(
-'has
 method
-s'
+CollectionName
 );%0A    t
@@ -1435,26 +1435,44 @@
 Name%5D%5B'/
-has
+' + 
 method
-s
+CollectionName + '
 /insert'
@@ -1484,24 +1484,80 @@
 unction');%0A%0A
+    var noMethodCollectionName = 'nomethods' + test.id;%0A
     var nome
@@ -1585,27 +1585,38 @@
 lection(
-'
 no
-m
+M
 ethod
-s'
+CollectionName
 , %7Bdefin
@@ -1698,25 +1698,46 @@
 Name%5D%5B'/
+' + 
 no
-m
+M
 ethod
-s
+CollectionName + '
 /insert'

Fix collection creation tests to pass when they re-run