// Path: src/main/java/io/github/marioluan/datastructures/wrappers/ArrayResizable.java
// public class ArrayResizable<T> implements Resizable<T[]> {
// 
//     /**
//      * {@inheritDoc}
//      */
//     @SuppressWarnings("unchecked")
//     public T[] resize(T[] a, int n, int capacity) {
//         assert capacity >= n;
// 
//         T[] temp = (T[]) new Object[capacity];
//         for (int i = 0; i < n; i++)
//             temp[i] = a[i];
// 
//         return temp;
//     }
// }
// 
// Path: src/main/java/io/github/marioluan/datastructures/wrappers/Resizable.java
// public interface Resizable<T> {
// 
//     /**
//      * Resize the underlying object T holding the elements and returns a copy of
//      * it.
//      * <strong>Time complexity:</strong> O(n)<br>
//      * 
//      * @param a
//      *            the array to be resized
//      * @param n
//      *            the number of elements on the array
//      * @param capacity
//      *            the new capacity of the array
//      * @return the resized copy of a
//      */
//     T resize(T a, int n, int capacity);
// }


import static com.greghaskins.spectrum.Spectrum.afterEach;
import static com.greghaskins.spectrum.Spectrum.beforeEach;
import static com.greghaskins.spectrum.Spectrum.describe;
import static com.greghaskins.spectrum.Spectrum.it;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.BDDMockito.given;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyObject;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import java.util.NoSuchElementException;
import java.util.Random;
import org.junit.runner.RunWith;
import com.greghaskins.spectrum.Spectrum;
import io.github.marioluan.datastructures.wrappers.ArrayResizable;
import io.github.marioluan.datastructures.wrappers.Resizable;
package io.github.marioluan.datastructures.stack;






@SuppressWarnings("unchecked")
@RunWith(Spectrum.class)
public class DynamicArrayTest {

    private Resizable<Integer[]> rs;
    private Stack<Integer>       subject;

    {
        describe("DynamicArray", () -> {
            beforeEach(() -> {
// Path: src/main/java/io/github/marioluan/datastructures/wrappers/ArrayResizable.java
// public class ArrayResizable<T> implements Resizable<T[]> {
// 
//     /**
//      * {@inheritDoc}
//      */
//     @SuppressWarnings("unchecked")
//     public T[] resize(T[] a, int n, int capacity) {
//         assert capacity >= n;
// 
//         T[] temp = (T[]) new Object[capacity];
//         for (int i = 0; i < n; i++)
//             temp[i] = a[i];
// 
//         return temp;
//     }
// }
// 
// Path: src/main/java/io/github/marioluan/datastructures/wrappers/Resizable.java
// public interface Resizable<T> {
// 
//     /**
//      * Resize the underlying object T holding the elements and returns a copy of
//      * it.
//      * <strong>Time complexity:</strong> O(n)<br>
//      * 
//      * @param a
//      *            the array to be resized
//      * @param n
//      *            the number of elements on the array
//      * @param capacity
//      *            the new capacity of the array
//      * @return the resized copy of a
//      */
//     T resize(T a, int n, int capacity);
// }


// Path: src/test/java/io/github/marioluan/datastructures/stack/DynamicArrayTest.java
import static com.greghaskins.spectrum.Spectrum.afterEach;
import static com.greghaskins.spectrum.Spectrum.beforeEach;
import static com.greghaskins.spectrum.Spectrum.describe;
import static com.greghaskins.spectrum.Spectrum.it;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.BDDMockito.given;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyObject;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import java.util.NoSuchElementException;
import java.util.Random;
import org.junit.runner.RunWith;
import com.greghaskins.spectrum.Spectrum;
import io.github.marioluan.datastructures.wrappers.ArrayResizable;
import io.github.marioluan.datastructures.wrappers.Resizable;

package io.github.marioluan.datastructures.stack;






@SuppressWarnings("unchecked")
@RunWith(Spectrum.class)
public class DynamicArrayTest {

    private Resizable<Integer[]> rs;
    private Stack<Integer>       subject;

    {
        describe("DynamicArray", () -> {
            beforeEach(() -> {
                this.rs = mock(ArrayResizable.class);