### Question:
MongoStore extends StoreBase { @Override public void clear() throws IOException { BasicDBObject sessionQuery = new BasicDBObject(); sessionQuery.put(appContextProperty, this.getName()); try { this.collection.remove(sessionQuery); } catch (MongoException e) { this.manager.getContainer().getLogger().fatal("Unable to remove sessions for [" + this.getName() + "] from MongoDB", e); throw e; } }  @Override int getSize(); @Override String[] keys(); @Override Session load(String id); @Override void remove(String id); @Override void clear(); @Override void save(Session session); @Override String getStoreName(); String getConnectionUri(); void setConnectionUri(String connectionUri); String getHosts(); void setHosts(String hosts); String getDbName(); void setDbName(String dbName); String getCollectionName(); void setCollectionName(String collectionName); String getUsername(); void setUsername(String username); String getPassword(); void setPassword(String password); int getConnectionTimeoutMs(); void setConnectionTimeoutMs(int connectionTimeoutMs); int getConnectionWaitTimeoutMs(); void setConnectionWaitTimeoutMs(int connectionWaitTimeoutMs); int getMinPoolSize(); void setMinPoolSize(int minPoolSize); int getMaxPoolSize(); void setMaxPoolSize(int maxPoolSize); String getReplicaSet(); void setReplicaSet(String replicaSet); boolean isUseSecureConnection(); void setUseSecureConnection(boolean useSecureConnection); boolean isUseSlaves(); void setUseSlaves(boolean useSlaves); WriteConcern getWriteConcern(); void setWriteConcern(WriteConcern writeConcern); int getTimeToLive(); void setTimeToLive(int timeToLive);  }### Answer:
@Test public void testClear() throws Exception { this.mongoStore.clear(); int size = this.mongoStore.getSize(); assertTrue(size == 0); }