@Override public List<DependencyStatus> status() { // note failures are tested manually for now, if you make changes test // things still work // TODO TEST add tests exercising failures final String version; try { final CommandResult bi = gfs.getDB().command("buildInfo"); version = bi.getString("version"); } catch (MongoException e) { LoggerFactory.getLogger(getClass()).error("Failed to connect to MongoDB", e); return Arrays.asList( new DependencyStatus( false, "Couldn't connect to MongoDB: " + e.getMessage(), "GridFS", "Unknown")); } return Arrays.asList(new DependencyStatus(true, "OK", "GridFS", version)); }