### Question:
SimpleIntDeque { public void push(int v) { if (endIndexPlusOne >= arr.length) { arr = Arrays.copyOf(arr, (int) (arr.length * growFactor)); } arr[endIndexPlusOne] = v; endIndexPlusOne++; } SimpleIntDeque();  SimpleIntDeque(int initSize);  SimpleIntDeque(int initSize, float growFactor); void setGrowFactor(float factor); boolean isEmpty(); int pop(); int getSize(); void push(int v); @Override String toString();  }### Answer:
@Test public void testPush() { SimpleIntDeque deque = new SimpleIntDeque(8, 2f); for (int i = 0; i < 60; i++) { deque.push(i); assertEquals(i + 1, deque.getSize()); } assertEquals(60, deque.getSize()); assertEquals(0, deque.pop()); assertEquals(59, deque.getSize()); assertEquals(1, deque.pop()); assertEquals(58, deque.getSize()); deque.push(2); assertEquals(59, deque.getSize()); deque.push(3); assertEquals(60, deque.getSize()); for (int i = 0; i < 50; i++) { assertEquals(i + 2, deque.pop()); } assertEquals(10, deque.getSize()); assertEquals(39, deque.getCapacity()); deque.push(123); assertEquals(11, deque.getSize()); assertEquals(52, deque.pop()); assertEquals(10, deque.getSize()); }