@Test public void testGetDatabase() throws Exception { MongoDatabase db = provider.getDatabase(); assertEquals(db.getName(), "test_db"); }
public final MongoDatabase getDatabase() { if (!KernelThread.currentKernelThread().isPrivileged()) { throw new SecurityException("get database - not authorized"); } return this.db; }
MongoDBProvider implements DataBase { public final MongoDatabase getDatabase() { if (!KernelThread.currentKernelThread().isPrivileged()) { throw new SecurityException("get database - not authorized"); } return this.db; } }
MongoDBProvider implements DataBase { public final MongoDatabase getDatabase() { if (!KernelThread.currentKernelThread().isPrivileged()) { throw new SecurityException("get database - not authorized"); } return this.db; } MongoDBProvider(MongoDatabase db);  MongoDBProvider(String host, int port, String dbName, String mongoUser, String password); }
MongoDBProvider implements DataBase { public final MongoDatabase getDatabase() { if (!KernelThread.currentKernelThread().isPrivileged()) { throw new SecurityException("get database - not authorized"); } return this.db; } MongoDBProvider(MongoDatabase db);  MongoDBProvider(String host, int port, String dbName, String mongoUser, String password); final MongoClient getClient(); final MongoDatabase getDatabase(); @Override final void store(List<ResourceAnchor> anchors); @Override final void store(String user, String collection, PersistentObject obj); @Override void delete(String user, String name, PersistentObject obj); @Override void delete(String user, String name, String objName); @Override final void delete(List<ResourceAnchor> anchors); @Override final void createCollection(String user, String name); @Override final void deleteCollection(String user,String name); @Override final List<String> find(String user,
                                   String name,
                                   Map<String, Object> query); @Override final boolean collectionExists(String user, String name); }
MongoDBProvider implements DataBase { public final MongoDatabase getDatabase() { if (!KernelThread.currentKernelThread().isPrivileged()) { throw new SecurityException("get database - not authorized"); } return this.db; } MongoDBProvider(MongoDatabase db);  MongoDBProvider(String host, int port, String dbName, String mongoUser, String password); final MongoClient getClient(); final MongoDatabase getDatabase(); @Override final void store(List<ResourceAnchor> anchors); @Override final void store(String user, String collection, PersistentObject obj); @Override void delete(String user, String name, PersistentObject obj); @Override void delete(String user, String name, String objName); @Override final void delete(List<ResourceAnchor> anchors); @Override final void createCollection(String user, String name); @Override final void deleteCollection(String user,String name); @Override final List<String> find(String user,
                                   String name,
                                   Map<String, Object> query); @Override final boolean collectionExists(String user, String name);  }