### Question:
StunnerPointHandleDecorator extends PointHandleDecorator { @Override public Shape decorate(Shape shape, ShapeState state) { switch (state) { case NONE: case VALID: shape.setFillColor(MAIN_COLOR) .setFillAlpha(0.8) .setStrokeAlpha(1) .setShadow(SHADOW_SELECTED) .setStrokeWidth(2) .setStrokeColor(STROKE_COLOR); break; case INVALID: shape.setFillColor(ColorName.WHITE) .setFillAlpha(1) .setShadow(SHADOW_SELECTED) .setStrokeAlpha(1) .setStrokeWidth(2) .setStrokeColor(MAIN_COLOR); break; } return shape; }  @Override Shape decorate(Shape shape, ShapeState state); static final String MAIN_COLOR; static final String STROKE_COLOR; }### Answer:
@Test public void decorateValidNone() { tested.decorate(shape, IShapeDecorator.ShapeState.VALID); tested.decorate(shape, IShapeDecorator.ShapeState.NONE); verify(shape, times(2)).setFillColor(StunnerPointHandleDecorator.MAIN_COLOR); verify(shape, times(2)).setFillAlpha(0.8); verify(shape, times(2)).setStrokeAlpha(1); verify(shape, times(2)).setShadow(SHADOW_SELECTED); verify(shape, times(2)).setStrokeWidth(2); verify(shape, times(2)).setStrokeColor(StunnerPointHandleDecorator.STROKE_COLOR); }
@Test public void decorateInvalid() { tested.decorate(shape, IShapeDecorator.ShapeState.INVALID); verify(shape).setFillColor(ColorName.WHITE); verify(shape).setShadow(SHADOW_SELECTED); verify(shape).setFillAlpha(1); verify(shape).setStrokeAlpha(1); verify(shape).setStrokeWidth(2); verify(shape).setStrokeColor(StunnerPointHandleDecorator.MAIN_COLOR); }