public static void main(String[] args) throws UnknownHostException {
        MongoClient client = new MongoClient();
        DB course = client.getDB("course");
        DBCollection collection = course.getCollection("insertTest");

        CollectionUtils.showCollection(collection, true);

        collection.drop();

        BasicDBObject doc = new BasicDBObject("name", "James")
                .append("family", Arrays.asList(
                        new BasicDBObject("relationship", "wife").append("name", "Lora"),
                        new BasicDBObject("relationship", "daughter").append("name", "Sara")
                            .append("age","4")));

        collection.insert(doc);

        CollectionUtils.showCollection(collection, true);
    }