### Question:
AdminUserManager { public AdminUser queryAdminUser(String username) { DBObject query = MongoUtil.createDBObject(indexKey, username); DBObject adminUserObj = MongoUtil.queryFromMongo(query, databaseName, namespace, collection, null); if ( adminUserObj != null ) { AdminUser adminUser = (AdminUser)MongoUtil.constructObject(adminUserObj); return adminUser; } return null; } AdminUserManager(); static AdminUserManager getInstance(); void saveAdminUser(AdminUser adminUser); AdminUser queryAdminUser(String username); void removeAdminUser(String username); static void main(String[] args);  }### Answer:
@Test public void testQueryAdminUser() { AdminUser root = new AdminUser(); root.setUsername("root"); root.setPassword("r00t"); root.setEmail("root@xinqihd.com"); root.addPriviledge(PriviledgeKey.all_priviledge); AdminUserManager manager = AdminUserManager.getInstance(); manager.saveAdminUser(root); AdminUser actualUser = manager.queryAdminUser("root"); assertNotNull(actualUser); assertEquals("root", actualUser.getUsername()); assertEquals("r00t", actualUser.getPassword()); assertEquals("root@xinqihd.com", actualUser.getEmail()); assertEquals(true, actualUser.hasPriviledgeKey(PriviledgeKey.all_priviledge)); manager.removeAdminUser("root"); actualUser = manager.queryAdminUser("root"); assertNull(actualUser); }