Source:
<code>public void testSwitchingBetweenBrushAndEraser() throws SecurityException, IllegalArgumentException, NoSuchFieldException, IllegalAccessException { assertTrue("Waiting for DrawingSurface", mSolo.waitForView(DrawingSurface.class, 1, TIMEOUT)); PointF screenPoint = new PointF(mScreenWidth / 2, mScreenHeight / 2); PointF canvasPoint = Utils.getCanvasPointFromScreenPoint(screenPoint); ((Bitmap) PrivateAccess.getMemberValue(DrawingSurface.class, PaintroidApplication.drawingSurface, "mWorkingBitmap")).eraseColor(Color.BLACK); int colorBeforeErase = PaintroidApplication.drawingSurface.getPixel(canvasPoint); assertEquals("After painting black, pixel should be black", Color.BLACK, colorBeforeErase); selectTool(ToolType.ERASER); mSolo.clickOnScreen(screenPoint.x, screenPoint.y); mSolo.sleep(SHORT_TIMEOUT); int colorAfterErase = PaintroidApplication.drawingSurface.getPixel(canvasPoint); assertEquals("After erasing, pixel should be transparent again", Color.TRANSPARENT, colorAfterErase); selectTool(ToolType.BRUSH); mSolo.clickOnScreen(screenPoint.x, screenPoint.y); <START> mSolo.sleep(1000); <END> int colorAfterBrush = PaintroidApplication.drawingSurface.getPixel(canvasPoint); assertEquals("Brushing after erase should be black again like before erasing", Color.BLACK, colorAfterBrush); selectTool(ToolType.ERASER); mSolo.clickOnScreen(screenPoint.x, screenPoint.y); mSolo.sleep(SHORT_TIMEOUT); colorAfterErase = PaintroidApplication.drawingSurface.getPixel(canvasPoint); assertEquals("After erasing, pixel should be transparent again", Color.TRANSPARENT, colorAfterErase); }</code><technical_language>please a static variable</technical_language>

Target:
public void testSwitchingBetweenBrushAndEraser() throws SecurityException, IllegalArgumentException, NoSuchFieldException, IllegalAccessException { assertTrue("Waiting for DrawingSurface", mSolo.waitForView(DrawingSurface.class, 1, TIMEOUT)); PointF screenPoint = new PointF(mScreenWidth / 2, mScreenHeight / 2); PointF canvasPoint = Utils.getCanvasPointFromScreenPoint(screenPoint); ((Bitmap) PrivateAccess.getMemberValue(DrawingSurface.class, PaintroidApplication.drawingSurface, "mWorkingBitmap")).eraseColor(Color.BLACK); int colorBeforeErase = PaintroidApplication.drawingSurface.getPixel(canvasPoint); assertEquals("After painting black, pixel should be black", Color.BLACK, colorBeforeErase); selectTool(ToolType.ERASER); mSolo.clickOnScreen(screenPoint.x, screenPoint.y); mSolo.sleep(SHORT_TIMEOUT); int colorAfterErase = PaintroidApplication.drawingSurface.getPixel(canvasPoint); assertEquals("After erasing, pixel should be transparent again", Color.TRANSPARENT, colorAfterErase); selectTool(ToolType.BRUSH); mSolo.clickOnScreen(screenPoint.x, screenPoint.y); mSolo.sleep(MEDIUM_TIMEOUT); int colorAfterBrush = PaintroidApplication.drawingSurface.getPixel(canvasPoint); assertEquals("Brushing after erase should be black again like before erasing", Color.BLACK, colorAfterBrush); selectTool(ToolType.ERASER); mSolo.clickOnScreen(screenPoint.x, screenPoint.y); mSolo.sleep(SHORT_TIMEOUT); colorAfterErase = PaintroidApplication.drawingSurface.getPixel(canvasPoint); assertEquals("After erasing, pixel should be transparent again", Color.TRANSPARENT, colorAfterErase); }