AbstractConfig implements Config, Cloneable { @Override public int size() { return storage.size(); } AbstractConfig(MapSupplier mapSupplier); @Override int size(); @Override void clear(); @Override void clearExtraAttributes(); @Override void clearComments(); @Override Config.Entry getEntry(String[] path); @Override T set(String[] path, Object value); @Override Object add(String[] path, Object value); @Override T get(String[] path); @Override T set(AttributeType<T> attribute, String[] path, T value); @Override T add(AttributeType<T> attribute, String[] path, T value); @Override T remove(AttributeType<T> attribute, String[] path); @Override T get(AttributeType<T> attribute, String[] path); @Override Map<String, Object> valueMap(); @Override Set<Config.Entry> entries(); abstract AbstractConfig createSubConfig(); abstract AbstractConfig clone(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void size() { Config config = Config.inMemoryUniversal(); config.set("a.b.c", "value"); config.set("pi", PI); Config subConfig = Config.inMemoryUniversal(); subConfig.set("string", "test!"); config.set("subConfig", subConfig); assertEquals(1, subConfig.size()); assertEquals(3, config.size()); }