package com.xtremelabs.robolectric.shadows;

import android.util.SparseArray;
import android.util.SparseIntArray;

import com.xtremelabs.robolectric.internal.Implementation;
import com.xtremelabs.robolectric.internal.Implements;
import com.xtremelabs.robolectric.internal.RealObject;

@Implements(SparseIntArray.class)
public class ShadowSparseIntArray {

	private SparseArray<Integer> sparseArray = new SparseArray<Integer>();
	
	@RealObject
	private SparseIntArray realObject;
	
	@Implementation
	public int get( int key ){
		return sparseArray.get( key );
	}
	
	@Implementation
	public void put( int key, int value ){
		sparseArray.put( key, value );
	}
	
	@Implementation
	public int size() {
		return sparseArray.size();
	}
	
	@Implementation
	public int indexOfValue( int value ) {
		return sparseArray.indexOfValue( value );
	}
	
	@Implementation
	public int keyAt( int index ){
		return sparseArray.keyAt( index );
	}
}

@@ -566,32 +566,157 @@
 @Implementation%0A
+%09public int get(int key, int valueIfKeyNotFound)%7B%0A%09%09return sparseArray.get( key, valueIfKeyNotFound );%0A%09%7D%0A%09%0A%09@Implementation%0A
 %09public void put

Add new implementation to ShadowSparseIntArray