// Path: cubano-concordion/src/main/java/org/concordion/cubano/framework/resource/CloseListener.java
// public interface CloseListener {
//     default void beforeClosing(Closeable resource) {};
//     default void afterClosing(Closeable resource) {};
// }
// 
// Path: cubano-concordion/src/main/java/org/concordion/cubano/framework/resource/ResourceScope.java
// public enum ResourceScope {
//     /**
//      * Per Concordion Specification Example
//      */
//     EXAMPLE,
//     /**
//      * Per Concordion Specification
//      */
//     SPECIFICATION,
//     /**
//      * Per Concordion Suite, where a Suite equates to the top-level test that is invoked (normally using JUnit).
//      * Other tests that are invoked from the top-level test using the Run Command are part of the suite.
//      * Other tests invoked directly (from JUnit) form independent suites.
//      */
//     SUITE;
// }


import static org.junit.Assert.*;
import static org.hamcrest.Matchers.*;
import static org.mockito.Mockito.*;
import org.concordion.cubano.framework.resource.CloseListener;
import org.concordion.cubano.framework.resource.ResourceScope;
import org.junit.Test;
import org.mockito.InOrder;
import java.io.Closeable;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
        test1.closeSpecificationResources();

        assertThat(closedResources, contains("3", "1"));
        test1.closeSuiteResources();
        assertThat(closedResources, contains("3", "1", "4", "2"));
    }

    @Test
    public void callsListenerWhenClosingExamples() {
        test1.registerCloseableResource(resource2, ResourceScope.EXAMPLE, listener);

        test1.closeExampleResources();

        verify(listener).beforeClosing(resource2);
        verify(listener).afterClosing(resource2);
    }

    @Test
    public void callsListenerWhenClosingSpecification() {
        test1.registerCloseableResource(resource1, ResourceScope.SPECIFICATION, listener);

        test1.closeSpecificationResources();

        verify(listener).beforeClosing(resource1);
        verify(listener).afterClosing(resource1);
    }

    @Test
    public void callsListenerWhenClosingMultiple() {
        test1.registerCloseableResource(resource1, ResourceScope.EXAMPLE, listener);
// Path: cubano-concordion/src/main/java/org/concordion/cubano/framework/resource/CloseListener.java
// public interface CloseListener {
//     default void beforeClosing(Closeable resource) {};
//     default void afterClosing(Closeable resource) {};
// }
// 
// Path: cubano-concordion/src/main/java/org/concordion/cubano/framework/resource/ResourceScope.java
// public enum ResourceScope {
//     /**
//      * Per Concordion Specification Example
//      */
//     EXAMPLE,
//     /**
//      * Per Concordion Specification
//      */
//     SPECIFICATION,
//     /**
//      * Per Concordion Suite, where a Suite equates to the top-level test that is invoked (normally using JUnit).
//      * Other tests that are invoked from the top-level test using the Run Command are part of the suite.
//      * Other tests invoked directly (from JUnit) form independent suites.
//      */
//     SUITE;
// }


// Path: cubano-concordion/src/test/java/org/concordion/cubano/framework/ConcordionBaseTest.java
import static org.junit.Assert.*;
import static org.hamcrest.Matchers.*;
import static org.mockito.Mockito.*;
import org.concordion.cubano.framework.resource.CloseListener;
import org.concordion.cubano.framework.resource.ResourceScope;
import org.junit.Test;
import org.mockito.InOrder;
import java.io.Closeable;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

        test1.closeSpecificationResources();

        assertThat(closedResources, contains("3", "1"));
        test1.closeSuiteResources();
        assertThat(closedResources, contains("3", "1", "4", "2"));
    }

    @Test
    public void callsListenerWhenClosingExamples() {
        test1.registerCloseableResource(resource2, ResourceScope.EXAMPLE, listener);

        test1.closeExampleResources();

        verify(listener).beforeClosing(resource2);
        verify(listener).afterClosing(resource2);
    }

    @Test
    public void callsListenerWhenClosingSpecification() {
        test1.registerCloseableResource(resource1, ResourceScope.SPECIFICATION, listener);

        test1.closeSpecificationResources();

        verify(listener).beforeClosing(resource1);
        verify(listener).afterClosing(resource1);
    }

    @Test
    public void callsListenerWhenClosingMultiple() {
        test1.registerCloseableResource(resource1, ResourceScope.EXAMPLE, listener);
        test1.registerCloseableResource(resource2, ResourceScope.SPECIFICATION, listener);