@Test public void testCreate() { System.out.println("create"); MongoDBSessionDataStorage instance = new MongoDBSessionDataStorage(mongoClient.getDatabase(DATABASE_NAME)); SessionData sessionData = instance.create(); String sessionId = sessionData.getId(); sessionData.put(KEY, VALUE); instance.save(sessionData); SessionData saved = instance.get(sessionId); assertEquals(sessionData, saved); String value1 = sessionData.get(KEY); String value2 = saved.get(KEY); assertEquals(value1, value2); }
@Override public SessionData create() { return new DefaultSessionData(); }
MongoDBSessionDataStorage implements SessionDataStorage { @Override public SessionData create() { return new DefaultSessionData(); } }
MongoDBSessionDataStorage implements SessionDataStorage { @Override public SessionData create() { return new DefaultSessionData(); } MongoDBSessionDataStorage(MongoDatabase database);  MongoDBSessionDataStorage(MongoDatabase database, int idleTime);  MongoDBSessionDataStorage(MongoDatabase database, String collection);  MongoDBSessionDataStorage(MongoDatabase database, String collection, long idleTime, SessionDataTranscoder transcoder); }
MongoDBSessionDataStorage implements SessionDataStorage { @Override public SessionData create() { return new DefaultSessionData(); } MongoDBSessionDataStorage(MongoDatabase database);  MongoDBSessionDataStorage(MongoDatabase database, int idleTime);  MongoDBSessionDataStorage(MongoDatabase database, String collection);  MongoDBSessionDataStorage(MongoDatabase database, String collection, long idleTime, SessionDataTranscoder transcoder); @Override SessionData create(); @Override void save(SessionData sessionData); @Override SessionData get(String sessionId); @Override void delete(String sessionId); }
MongoDBSessionDataStorage implements SessionDataStorage { @Override public SessionData create() { return new DefaultSessionData(); } MongoDBSessionDataStorage(MongoDatabase database);  MongoDBSessionDataStorage(MongoDatabase database, int idleTime);  MongoDBSessionDataStorage(MongoDatabase database, String collection);  MongoDBSessionDataStorage(MongoDatabase database, String collection, long idleTime, SessionDataTranscoder transcoder); @Override SessionData create(); @Override void save(SessionData sessionData); @Override SessionData get(String sessionId); @Override void delete(String sessionId);  }