@TestTargetNew(
      level = TestLevel.COMPLETE,
      method = "onBoundsChange",
      args = {android.graphics.Rect.class})
  @ToBeFixed(
      bug = "1371108",
      explanation = "There should not be a" + " NullPointerException thrown out.")
  public void testOnBoundsChange() {
    Drawable d = mContext.getResources().getDrawable(R.drawable.pass);
    MockInsetDrawable insetDrawable = new MockInsetDrawable(d, 5);

    Rect bounds = d.getBounds();
    assertEquals(0, bounds.left);
    assertEquals(0, bounds.top);
    assertEquals(0, bounds.right);
    assertEquals(0, bounds.bottom);

    Rect r = new Rect();
    insetDrawable.onBoundsChange(r);

    assertEquals(5, bounds.left);
    assertEquals(5, bounds.top);
    assertEquals(-5, bounds.right);
    assertEquals(-5, bounds.bottom);

    // input null as param
    try {
      insetDrawable.onBoundsChange(null);
      fail("There should be a NullPointerException thrown out.");
    } catch (NullPointerException e) {
      // expected, test success
    }
  }