title: Create test data in MongoDB
body: <p>I want to generate test data for MongoDB. The size should be 200 Mb. I tried this code:</p>
  
  <pre><code>@Test
      public void testMongoDBTestDataGenerate()
      {
          MongoClient mongoClient = new MongoClient("localhost", 27017);
  
          DB db = mongoClient.getDB("development");
          DBCollection collection = db.getCollection("ssv");
  
          for (int i = 0; i &lt; 100; i++)
          {
              BasicDBObject document = new BasicDBObject();
              document.put("database", "test");
              document.put("table", "hosting");
  
              BasicDBObject documentDetail = new BasicDBObject();
              documentDetail.put("records", 99);
              documentDetail.put("index", "vps_index1");
              documentDetail.put("active", "true");
  
              document.put("detail", documentDetail);
  
              collection.insert(document);
          }
  
          mongoClient.close();
  
      }
  </code></pre>
  
  <p>How I can generate data exactly with this size?</p>