### Question:
MongoConnector { public static MongoClient createClient() throws NumberFormatException, UnknownHostException { if (!clients.containsKey(database)) { validateConfig(database); MongoCredential credential = MongoCredential.createMongoCRCredential(user, database, password.toCharArray()); clients.put(database, new MongoClient(new ServerAddress(host, Integer.valueOf(port)), Arrays.asList(credential))); } return clients.get(database); }  static MongoClient createClient(); static MongoClient createClient(String database); static String getHost(); static void setHost(String host); static String getPort(); static void setPort(String port); static String getUser(); static void setUser(String user); static String getPassword(); static void setPassword(String password); static String getDatabase(); static void setDatabase(String database);  }### Answer:
@Test(expectedExceptions = { RuntimeException.class }) public void testConfigValidation() throws NumberFormatException, UnknownHostException { MongoConnector.createClient(); }
@Test(enabled = false) public void testConnect() throws NumberFormatException, UnknownHostException { MongoClient mc = MongoConnector.createClient(); DB db = mc.getDB("lcdocs"); DBCollection collection = db.getCollection("statements.files"); DBCursor cursor = collection.find(new BasicDBObject("filename", Pattern.compile("/.*278174.*/"))); while (cursor.hasNext()) { collection.remove(cursor.next()); } }