### Question:
GameContext { public final void scheduleTask(Runnable command, long delay, TimeUnit unit) { ScheduleWorker worker = new ScheduleWorker(command); ScheduledFuture<?> future = this.scheduleTaskPool.schedule(worker, delay, unit); } private  GameContext(); void initContext(); void destroyContext(); void reloadContext(); static GameContext getInstance(); static GameContext getTestInstance(); Context getJndiContext(); UserManager getUserManager(); RoomManager getRoomManager(); ScriptManager getScriptManager(); BattleManager getBattleManager(); GameDataManager getGameDataManager(); EquipManager getEquipManager(); MapManager getMapManager(); ItemManager getItemManager(); ShopManager getShopManager(); TaskManager getTaskManager(); DailyMarkManager getDailyMarkManager(); TipManager getTipManager(); CraftManager getCraftManager(); ChatManager getChatManager(); SessionManager getSessionManager(); String findMachineId(SessionKey sessionKey); String findMachineId(UserId userId); UserId findUserIdBySessionKey(SessionKey sessionKey); List<SessionKey> findAllOnlineUsers(); IoSession findLocalUserIoSession(SessionKey sessionKey); User findLocalUserBySessionKey(SessionKey sessionKey); User updateLocalUserBySessionKey(SessionKey sessionKey, User user); SessionKey findSessionKeyByUserId(UserId userId); void registerUserSession(IoSession session, User user, SessionKey existSessionKey); void deregisterUserByIoSession(IoSession session); void deregisterUserBySessionKey(SessionKey sessionKey); void writeResponse(IoSession session, Object message, SessionKey sessionKey); void writeResponse(SessionKey sessionKey, Object message); void registerRpcService(Service service); Service findRpcService(String serviceName, String methodName); MinaRpcPoolChannel findRpcChannel(String rpcServerId); GameProxyClient findGameProxyChannel(String gameServerId); String getGameServerId(); void setGameServerId(String gameServerId); final User findGlobalUserBySessionKey(SessionKey sessionKey); final boolean proxyToRemoteGameServer(SessionKey userSessionKey, String gameServerId, Message pbMessage); final void scheduleTask(Runnable command, long delay, TimeUnit unit); final void runSmallTask(Runnable command); final void forceUserToHome(SessionKey userSessionKey); LocaleThreadLocal getLocaleThreadLocal(); static int VERSION; }### Answer:
@Test public void testScheduleTask() throws Exception { GameContext.getInstance().initContext(); GameContext.getInstance().scheduleTask(new Runnable() { public void run() { System.out.println("schedule task after 3 seconds"); } }, 2, TimeUnit.SECONDS); Thread.currentThread().sleep(3000); }