mongo.getDB("test").getCollection("people").drop();
PersonRepository personRepository = context.getBean(PersonRepository.class);
// add some people
Person mark = new Person("Mark");
Map<String, Object> marksPersonalInfo = new HashMap<String, Object>();
marksPersonalInfo.put("Project Lead", "Spring Integration");
marksPersonalInfo.put("Location", "Cambridge, MA");
mark.setPersonalInfo(marksPersonalInfo);
personRepository.add(mark);
Person thomas = new Person("Thomas");
Map<String, Object> thomasPersonalInfo = new HashMap<String, Object>();
thomasPersonalInfo.put("Hobby", "photography");
thomasPersonalInfo.put("Sport", "soccer");
thomasPersonalInfo.put("Location", "Stratham, NH");
thomas.setPersonalInfo(thomasPersonalInfo);
personRepository.add(thomas);
System.out.println("There are currently " + personRepository.count() + " people in the DB:");
List<Person> people = personRepository.getAll();
for (Person person : people) {