@Test
public void testSectionNames() {

    ConfigurationSection section;
    ConfigurationSection buffer;
    section = new ConfigurationSection();
    // Create 10 variables.
    buffer = null;
    for(int i = 0; i < 10; i++)
        buffer = section.addSection("sect" + i);
    assertSectionNames(section, 10);
    // Removes the last section by value, makes sure we're in a coherent state.
    assert section.removeSection(buffer);
    assertSectionNames(section, 9);
    // Removes the last section by name, makes sure we're in a coherent state.
    assert section.removeSection("sect8") != null;
    assertSectionNames(section, 8);
    for(int i = 0; i < 8; i++)
        assert section.removeSection("sect" + i) != null;
    assertSectionNames(section, 0);
}