### Question:
Decorator extends Group { public Decorator show(final double x, final double y) { if (!timer.isRunning()) { decorator.animate(AnimationTweener.LINEAR, AnimationProperties.toPropertyList(AnimationProperty.Properties.STROKE_ALPHA(1)), ANIMATION_DURATION, createShowAnimationCallback(x, y)); timer.schedule(TIMER_DELAY); } return this; } Decorator(final ItemCallback callback); Decorator setPadding(final double padding); Decorator setItemCallback(final ItemCallback callback); IPrimitive<?> build(final IPrimitive<?> item,
                               final double width,
                               final double height); Rectangle createRectangle(final double width,
                                     final double height); Decorator show(final double x,
                          final double y); Decorator hide();  }### Answer:
@Test public void testShow() { decorator.build(primitive, 6.0, 0.6); doReturn(animationHandle).when((Node) rectangle).animate(anyObject(), anyObject(), anyDouble(), anyObject()); decorator.resetTimer(timer); when(timer.isRunning()).thenReturn(true); decorator.show(4, 5); verify(rectangle, never()).animate(anyObject(), anyObject(), anyDouble(), anyObject()); when(timer.isRunning()).thenReturn(false); decorator.show(0.1, 0); verify(decorator).createShowAnimationCallback(0.1, 0); verify(rectangle).animate(anyObject(), anyObject(), anyDouble(), anyObject()); verify(timer).schedule(anyInt()); }