ConfigurationSection { public Iterator<String> sectionNames() { return sections.keySet().iterator(); } ConfigurationSection(); String removeVariable(String name); String getVariable(String name); boolean setVariable(String name, String value); Iterator<String> variableNames(); boolean hasVariables(); static int getIntegerValue(String value); static ValueList getListValue(String value, String separator); static float getFloatValue(String value); static boolean getBooleanValue(String value); static long getLongValue(String value); static double getDoubleValue(String value); static String getValue(int value); static String getValue(List<String> value, String separator); static String getValue(float value); static String getValue(boolean value); static String getValue(long value); static String getValue(double value); ConfigurationSection addSection(String name); ConfigurationSection removeSection(String name); boolean removeSection(ConfigurationSection section); ConfigurationSection getSection(String name); Iterator<String> sectionNames(); boolean hasSections(); boolean isEmpty(); void clear();  }
@Test public void testSectionNames() { ConfigurationSection section; ConfigurationSection buffer; section = new ConfigurationSection(); buffer = null; for(int i = 0; i < 10; i++) buffer = section.addSection("sect" + i); assertSectionNames(section, 10); assert section.removeSection(buffer); assertSectionNames(section, 9); assert section.removeSection("sect8") != null; assertSectionNames(section, 8); for(int i = 0; i < 8; i++) assert section.removeSection("sect" + i) != null; assertSectionNames(section, 0); }