### Question:
PrimitiveLongIntKeyValueArray { public void ensureCapacity( int newCapacity ) { int capacity = naturalKeys.length; if ( newCapacity > capacity ) { long[] newNaturalKeys = new long[newCapacity]; int[] newNaturalValues = new int[newCapacity]; long[] newSortedKeys = new long[newCapacity]; int[] newSortedValues = new int[newCapacity]; for ( int i = 0; i < capacity; i++ ) { newNaturalKeys[i] = naturalKeys[i]; newNaturalValues[i] = naturalValues[i]; newSortedKeys[i] = sortedKeys[i]; newSortedValues[i] = sortedValues[i]; } naturalKeys = newNaturalKeys; naturalValues = newNaturalValues; sortedKeys = newSortedKeys; sortedValues = newSortedValues; } } PrimitiveLongIntKeyValueArray( int initialCapacity, double growthFactor );  PrimitiveLongIntKeyValueArray( int initialCapacity );  PrimitiveLongIntKeyValueArray(); int capacity(); double growthFactor(); void ensureCapacity( int newCapacity ); int size(); int getOrDefault( long key, int defaultValue ); boolean putIfAbsent( long key, int value ); void reset( int newCapacity ); long[] keys(); static final int DEFAULT_INITIAL_CAPACITY; static final double DEFAULT_GROWTH_FACTOR; }### Answer:
@Test void testEnsureCapacity() { PrimitiveLongIntKeyValueArray map = new PrimitiveLongIntKeyValueArray(); assertThat( map.capacity(), equalTo( PrimitiveLongIntKeyValueArray.DEFAULT_INITIAL_CAPACITY ) ); map.ensureCapacity( 10 ); assertThat( map.capacity(), greaterThanOrEqualTo( 10 ) ); map.ensureCapacity( 100 ); assertThat( map.capacity(), greaterThanOrEqualTo( 100 ) ); map.ensureCapacity( 1000 ); assertThat( map.capacity(), greaterThanOrEqualTo( 1000 ) ); }