@Test
 public void hasOpaqueRegionReturnsFalseIfFillPaintIsNotOpaque() {
   shape.setFillPaint(
       new LinearGradient(
           0,
           0,
           1,
           1,
           BaseTransform.IDENTITY_TRANSFORM,
           true,
           0,
           Arrays.asList(new Stop(Color.BLACK, 0), new Stop(Color.TRANSPARENT, 1))));
   assertFalse(shape.hasOpaqueRegion());
 }
 @Test
 public void hasOpaqueRegionReturnsFalseIfFillPaintIsNull() {
   shape.setFillPaint(null);
   assertFalse(shape.hasOpaqueRegion());
 }
 @Test
 public void hasOpaqueRegionReturnsFalseIfModeIsEmpty() {
   shape.setMode(NGShape.Mode.EMPTY);
   assertFalse(shape.hasOpaqueRegion());
 }
 @Test
 public void hasOpaqueRegionReturnsFalseIfModeIsStroke() {
   shape.setMode(NGShape.Mode.STROKE);
   assertFalse(shape.hasOpaqueRegion());
 }
 @Test
 public void hasOpaqueRegionReturnsTrueIfModeIsFILL() {
   assertTrue(shape.hasOpaqueRegion());
 }
 @Test
 public void hasOpaqueRegionReturnsTrueIfModeIsSTROKE_FILE() {
   shape.setMode(NGShape.Mode.STROKE_FILL);
   assertTrue(shape.hasOpaqueRegion());
 }