SketchSharer { public static SketchSharer newInstance() { Context context = ContextRetriever.INSTANCE.getApplicationContext(); RainbowDrawer rainbowDrawer = SketchRetriever.INSTANCE.getZenSketch().getRainbowDrawer(); File saveFolder = new File(context.getCacheDir(), "images"); String authority = context.getString(R.string.file_provider); ScreenshotTaker screenshotTaker = new ScreenshotTaker(context, rainbowDrawer, saveFolder, authority); return new SketchSharer(screenshotTaker); } SketchSharer(ScreenshotTaker screenshotTaker); static SketchSharer newInstance(); void shareSketch();  }
@Test public void testThatNewInstanceReturnsNotNullSketchSharer() { assertThat(SketchSharer.newInstance()).isNotNull(); }
@Test public void testThatNewInstanceReturnsANewInstance() { SketchSharer secondInstance = SketchSharer.newInstance(); SketchSharer firstInstance = SketchSharer.newInstance(); assertThat(firstInstance).isNotEqualTo(secondInstance); }