@Test
public void testSetBorder() {

    Bitmap bitmap = Bitmap.createBitmap(200, 200, Bitmap.Config.ARGB_8888);
    CircularDrawable drawable = new CircularDrawable(bitmap);
    drawable.setBorder(2.0f, Color.BLACK);
    Canvas canvas = Mockito.mock(Canvas.class);
    drawable.draw(canvas);
    // draws twice. once for border paint and once for the bitmap
    Mockito.verify(canvas, Mockito.times(2)).drawCircle(Mockito.anyFloat(),
            Mockito.anyFloat(), Mockito.anyFloat(), (Paint) Mockito.any());
    Assert.assertEquals(202, drawable.getIntrinsicWidth());
    Assert.assertEquals(202, drawable.getIntrinsicHeight());
    drawable.clearBorder();
    Assert.assertEquals(200, drawable.getIntrinsicWidth());
    Assert.assertEquals(200, drawable.getIntrinsicHeight());
}