title: Robolectric custom shadow code
body: <p>Hi everytime i am getting this exception trace with Robolectric while working on custom shadows</p>
  
  <pre><code>java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
      at org.robolectric.bytecode.RobolectricInternals.newInstanceOf(RobolectricInternals.java:33)
      at org.robolectric.Robolectric.newInstanceOf(Robolectric.java:345)
      at org.robolectric.shadows.ShadowBitmapFactory.create(ShadowBitmapFactory.java:120)
      at org.robolectric.shadows.ShadowBitmapFactory.decodeFile(ShadowBitmapFactory.java:72)
      at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java)
  </code></pre>
  
  <p>what i am doing is i have a custom shadow</p>
  
  <pre><code>@Implements(Bitmap.class)
  class MyShadowBitmap extends org.robolectric.shadows.ShadowBitmap {
  
      public MyShadowBitmap() {
          // can also be some other config value
          setConfig(Bitmap.Config.ARGB_8888);
      }
  
  }
  </code></pre>
  
  <p>and i am using this class</p>
  
  <pre><code>public class CustomTestRunner extends RobolectricTestRunner {
      public CustomTestRunner(Class&lt;?&gt; testClass) throws InitializationError {
          super(testClass);
      }
      @Override
         public Setup createSetup() {
             return new MySetup();
         }
      @Override
      protected ShadowMap createShadowMap() {
          return super.createShadowMap()
                  .newBuilder()
                  .addShadowClass(MyShadowBitmap.class)
  
                  .build();
      }
      }
  }
  </code></pre>
  
  <p>and also i am running my test cases as </p>
  
  <pre><code>@Test
      @Config(shadows = {
          MyShadowBitmap.class
      })
  </code></pre>
  
  <p>please help me that where i am doing wrong and how to work with custom shadows in robolectric!!</p>