@TestTargetNew(
      level = TestLevel.COMPLETE,
      method = "draw",
      args = {android.graphics.Canvas.class})
  @ToBeFixed(
      bug = "1400249",
      explanation =
          "it's hard to do unit test, should be tested by"
              + " functional test, and there should not be an NullPointerException thrown out.")
  public void testDraw() {
    Drawable d = mContext.getResources().getDrawable(R.drawable.pass);
    InsetDrawable insetDrawable = new InsetDrawable(d, 0);

    Canvas c = new Canvas();
    insetDrawable.draw(c);

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