ZenSketch extends Rainbow implements FlowerSelectedListener { public static ZenSketch newInstance(ZenSketchView zenSketchView, Listener sketchListener) { RainbowDrawer rainbowDrawer = new RainbowDrawer(); RainbowInputController rainbowInputController = RainbowInputController.newInstance(); InkDrop inkDrop = InkDrop.newInstance(rainbowInputController); InkPerformer inkPerformer = InkPerformer.newInstance(inkDrop, rainbowInputController.getRainbowDrawer(), rainbowInputController); BranchPerformer branchPerformer = BranchPerformer.newInstance(inkDrop, rainbowDrawer, rainbowInputController); SketchInteractionListener sketchInteractionListener = SketchInteractionListener.newInstance(inkPerformer); ZenSketch zenSketch = new ZenSketch( MusicPerformer.newInstance(rainbowInputController), inkPerformer, branchPerformer, zenSketchView, rainbowDrawer, rainbowInputController, sketchInteractionListener, sketchListener ); SketchRetriever.INSTANCE.inject(zenSketch); return zenSketch; } protected  ZenSketch(
            MusicPerformer musicPerformer,
            InkPerformer inkPerformer,
            BranchPerformer branchPerformer,
            ZenSketchView zenSketchView,
            RainbowDrawer rainbowDrawer,
            RainbowInputController rainbowInputController,
            SketchInteractionListener sketchInteractionListener,
            Listener sketchListener); static ZenSketch newInstance(ZenSketchView zenSketchView,
                                        Listener sketchListener); @Override void onSketchSetup(); @Override void onDrawingStart(); @Override void onDrawingResume(); @Override void onDrawingStep(); @Override void onDrawingPause(); @Override void onDrawingStop(); @Override void onSketchDestroy(); void clear(); void setOnPaintingListener(PaintListener paintListener); @Override void onFlowerSelected(Flower flower);  }
@Test public void testThatNewInstanceReturnsNotNullBrushOptionsPreferences() { assertThat(ZenSketch.newInstance(zenSketchView, sketchListener)).isNotNull(); }
@Test public void testThatNewInstanceReturnsANewInstance() { ZenSketch firstInstance = ZenSketch.newInstance(zenSketchView, sketchListener); ZenSketch secondInstance = ZenSketch.newInstance(zenSketchView, sketchListener); assertThat(firstInstance).isNotEqualTo(secondInstance); }