DefaultLeveledEmbededSet implements LeveledEmbededSet<T> { @Override public void resume(T t, int level) { if(level < 0) { logger.warn("[resume] unsupported level: {}", level); return; } LeveledEmbededSet<T> root = getRoot(); root.remove(t); getThrough(level).add(t); }  @Override LeveledEmbededSet<T> getSuperSet(); @Override LeveledEmbededSet<T> getSubSet(); @Override LeveledEmbededSet<T> getThrough(int level); @Override Set<T> getCurrentSet(); @Override void add(T t); @Override void remove(T t); @Override void resume(T t, int level); DefaultLeveledEmbededSet<T> setSuperSet(DefaultLeveledEmbededSet<T> superSet); DefaultLeveledEmbededSet<T> setSubSet(DefaultLeveledEmbededSet<T> subSet);  }
@Test public void resume() { root.add("hello"); LeveledEmbededSet<String> level3 = root.getThrough(3); Assert.assertTrue(level3.getCurrentSet().isEmpty()); root.resume("hello", 3); Assert.assertFalse(level3.getCurrentSet().isEmpty()); Assert.assertEquals(Sets.newHashSet("hello"), level3.getCurrentSet()); Assert.assertEquals(Sets.newHashSet("hello"), root.getCurrentSet()); }