import grails.test.*
import org.apache.commons.collections.list.LazyList

class TaskProcedureTests extends GrailsUnitTestCase {
    protected void setUp() {
        super.setUp()
    }

    protected void tearDown() {
        super.tearDown()
    }

    void testLazyLists() {

        def tp = new TaskProcedure()
        assert tp.maintenanceActions instanceof ArrayList
        assert tp.maintenanceActionLazyList instanceof LazyList
        // MaintenanceActions is still an ArrayList after decoration.
        // This may be a requirement of other parts of Grails, for example sortableColumn
        // seems to have issues if it's not.
        assert tp.maintenanceActions instanceof ArrayList
        assert ! (tp.maintenanceActions instanceof LazyList)

    }
}
