return (BasicDBObject) JSON.parse(string);
}
@Before
public void setUp() throws Exception {
mongoServer = new MongoServer(new MemoryBackend());
InetSocketAddress serverAddress = mongoServer.bind();
client = new MongoClient(new ServerAddress(serverAddress));
db = client.getDB("testdb");
admin = client.getDB("admin");
collection = db.getCollection("testcoll");